public ActionResult Create(TodoList todolist) { if (ModelState.IsValid) { db.TodoList.Add(todolist); db.SaveChanges(); return RedirectToAction("Index"); } return View(todolist); }
private bool Equals(TodoList other) { return(Equals(TodoElements, other.TodoElements)); }
public ActionResult Edit(TodoList todolist) { if (ModelState.IsValid) { db.Entry(todolist).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(todolist); }