public ActionResult DeleteConfirmed(int id) { Master_Roles master_Roles = db.Master_Roles.Find(id); db.Master_Roles.Remove(master_Roles); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RoleId,RoleName,RoleKey")] Master_Roles master_Roles) { if (ModelState.IsValid) { db.Entry(master_Roles).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(master_Roles)); }
public ActionResult Create([Bind(Include = "RoleId,RoleName,RoleKey")] Master_Roles master_Roles) { if (ModelState.IsValid) { db.Master_Roles.Add(master_Roles); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(master_Roles)); }
// GET: Roles/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Master_Roles master_Roles = db.Master_Roles.Find(id); if (master_Roles == null) { return(HttpNotFound()); } return(View(master_Roles)); }