public ActionResult DeleteTodoItem(int id) { var todoItem = _repository.GetTodoItemById(id); if (todoItem != null) { _repository.DeleteTodoItem(todoItem); _repository.SaveChanges(); return(NoContent()); } return(NotFound()); }
public async Task <TodoItem> DeleteTodoItem(long id) { return(await _repo.DeleteTodoItem(id)); }