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