private async void ExecuteConfirmDeleteClickedCommand() { Loading = true; await _todoItemsService.DeleteTodoItem(CurrentTodoItem); TodoItemsList = await _todoItemsService.GetTodoItems(); DeleteGridVisibility = Loading = false; }
public async Task <ActionResult <TodoItemDto> > DeleteTodoItem(long id) { var item = await _todoItemsService.GetTodoItem(id); if (item == null) { return(NotFound()); } TodoItemDto itemDeleted = await _todoItemsService.DeleteTodoItem(item); return(itemDeleted); }
public async Task <IActionResult> DeleteTodoItem(long id) { var exists = _itemsService.TodoItemExists(id); if (!exists) { return(NotFound()); } await _itemsService.DeleteTodoItem(id); return(NoContent()); }