常用方法
常用方法
常用方法
常用方法
public IActionResult DeleteTaskById(ToDoItem toDoItem) { _toDoListRepository.DeleteTask(toDoItem); if (!_toDoListRepository.SaveTask()) { return(StatusCode(500, "An error occurred while trying to delete your task.")); } return(NoContent()); }