public ActionResult Delete(int id) { try { bool delete = _toDosServices.DeleteToDo(id); if (delete) { return(RedirectToAction("Index")); } return(RedirectToAction("Delete")); } catch (Exception e) { return(View("Error", new HandleErrorInfo(e, "ToDoLists", "Edit"))); } }