-
-
Save kierunb/0928a39160defb923f43fd3e65f23a64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Microsoft.AspNetCore.Mvc; | |
| using warsztaty14_11.Models; | |
| namespace warsztaty14_11.Controllers | |
| { | |
| [Route("[controller]")] | |
| public class PersonController : ControllerBase | |
| { | |
| // POST: /person | |
| [HttpPost] | |
| [Route("")] | |
| public ActionResult Save([FromBody]PersonModel request) | |
| { | |
| Console.WriteLine($"Person: {request.FirstName}"); | |
| // status 201 | |
| return Created("uri", request); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment