Created
May 3, 2017 15:08
-
-
Save dcomartin/f8ceb58044163075165adcd2bec56e8d to your computer and use it in GitHub Desktop.
This file contains 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
[HttpPost] | |
public IActionResult Create([FromBody] TodoItem item) | |
{ | |
if (item == null) | |
{ | |
return BadRequest(); | |
} | |
_todoRepository.Add(item); | |
return CreatedAtRoute("GetTodo", new { id = item.Key }, item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment