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