public IHttpActionResult DeleteToDoItem(int itemId) { try { _todoListService.DeleteToDoItem(itemId); return(Ok(itemId)); } catch { return(InternalServerError()); } }
public IActionResult DeleteConfirmed(int toDoItemId) { _toDoListService.DeleteToDoItem(toDoItemId); return(RedirectToAction(nameof(ToDoListLogged))); }