예제 #1
0
        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);
        }
예제 #3
0
        public async Task <IActionResult> DeleteTodoItem(long id)
        {
            var exists = _itemsService.TodoItemExists(id);

            if (!exists)
            {
                return(NotFound());
            }

            await _itemsService.DeleteTodoItem(id);

            return(NoContent());
        }