public IActionResult Put(Guid id, [FromBody] Models.Task task) { var updated = Repository.UpdateTask(id, task); if (updated == null) { return(NotFound()); } return(Json(updated)); }
public IActionResult Post([FromBody] Models.Task task) { var created = Repository.CreateTask(task); return(CreatedAtRoute("GetTask", new { id = created.Id }, created)); }