public IActionResult Edit(Role role) { if (ModelState.IsValid) { _context.Update(role); _context.SaveChanges(); return RedirectToAction("Index"); } return View(role); }
public IActionResult Create(Role role) { if (ModelState.IsValid) { _context.DBRoles.Add(role); _context.SaveChanges(); return RedirectToAction("Index"); } return View(role); }