public IActionResult Delete([FromBody] Todo todo) { try { if (ModelState.IsValid) { _todos.Delete(todo.Id); } return(NoContent()); } catch (EntityNotFoundException) { return(NotFound()); } }
public void Delete(dynamic @params) { todos.Delete(@params.Id); }