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