public IActionResult UpdateOne(Fric_frac.Models.FricFrac.Role Role) { if (ModelState.IsValid) { try { dbContext.Update(Role); dbContext.SaveChanges(); ViewBag.Roles = dbContext.Role.ToList(); return(View("ReadingOne", Role)); } catch (DbUpdateConcurrencyException) { if (!dbContext.Role.Any(e => e.Id == Role.Id)) { return(NotFound()); } else { throw; } } } return(View("Index", Role)); }
public IActionResult InsertOne(Fric_frac.Models.FricFrac.Role Role) { ViewBag.Message = "Fric-frac Role Inserting One"; dbContext.Role.Add(Role); dbContext.SaveChanges(); return(View("Index", dbContext.Role.ToList())); }