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