public ActionResult EditList(NewsLetterList model) { if (ModelState.IsValid) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Lists")); } return(PartialView(model)); }
public ActionResult CreateList(NewsLetterList model) { if (ModelState.IsValid) { db.NewsLetterLists.Add(model); db.SaveChanges(); return(RedirectToAction("Lists")); } return(PartialView(model)); }