public ActionResult Create(SysList model) { if (ModelState.IsValid) { db.Entry(model).State = EntityState.Added; db.SaveChanges(); return RedirectToAction("GetLists"); } return PartialView(model); }
public ActionResult Edit(SysList syslist) { if (ModelState.IsValid) { db.Entry(syslist).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("GetLists"); } return PartialView(syslist); }