public ActionResult CreateItem(ToDoItem toDoItem) { try { toDoItems.Insert(toDoItem); toDoItems.Commit(); return RedirectToAction("ShowList"); } catch { return View("Index"); } }
public ActionResult Edit(ToDoItem t) { try { toDoItems.Update(t); toDoItems.Commit(); return RedirectToAction("ShowList"); } catch { return View("ShowList"); } }
public ActionResult CreateItem() { var model = new ToDoItem(); return View(model); }