public ActionResult <Todo> Put(int id, [FromBody] Todo body) { return(Ok(_service.UpdateTodo(id, body))); }
public async Task <IActionResult> Put(int id, [FromBody] Todo item) { return(await this._repository.Update(id, item)); }
public ActionResult <Todo> Post([FromBody] Todo body) { return(Ok(_service.AddTodo(body))); }
public async Task <IActionResult> Create([FromBody] Todo item) { return(await this._repository.Insert(item)); }