public ActionResult Create(Checklist checklist) { if (ModelState.IsValid) { db.Checklists.Add(checklist); db.SaveChanges(); return RedirectToAction("Index"); } return View(checklist); }
public ActionResult Edit(Checklist checklist) { if (ModelState.IsValid) { db.Entry(checklist).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(checklist); }