예제 #1
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            var toDoItem = await _toDo.GetItem(id);

            await _toDo.DeleteAsync(toDoItem);

            //await _context.SaveChangesAsync();
            return(RedirectToAction(nameof(Index)));
        }
예제 #2
0
        public async Task <ActionResult> Delete(int id, [Bind("Id,Title,AssignedTo")] ToDoItem todo)
        {
            await _todoListService.DeleteAsync(id);

            return(RedirectToAction("Index"));
        }