public IActionResult Create([FromBody] TodoItem item) { if (item == null) { return(BadRequest()); } _todoService.Add(item); return(CreatedAtRoute("GetTodo", new { id = item.Id }, item)); }
public IActionResult Create([FromBody] TodoItem item) { if (item == null) { return(BadRequest()); } _todoService.Add(item); return(CreatedAtRoute("GetTodo", new { id = item.Id }, item)); }