public async Task <IActionResult> DeleteConfirmed(Guid id) { var toDoItem = await _toDo.GetItem(id); await _toDo.DeleteAsync(toDoItem); //await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }
public async Task <ActionResult> Delete(int id, [Bind("Id,Title,AssignedTo")] ToDoItem todo) { await _todoListService.DeleteAsync(id); return(RedirectToAction("Index")); }