public ActionResult DeleteConfirmed(string id) { SPMRole sPMRole = db.IdentityRoles.Find(id); db.IdentityRoles.Remove(sPMRole); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name")] SPMRole sPMRole) { if (ModelState.IsValid) { db.Entry(sPMRole).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sPMRole)); }
public ActionResult Create([Bind(Include = "Id,Name")] SPMRole sPMRole) { if (ModelState.IsValid) { db.IdentityRoles.Add(sPMRole); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sPMRole)); }
// GET: SPMRoles/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SPMRole sPMRole = db.IdentityRoles.Find(id); if (sPMRole == null) { return(HttpNotFound()); } return(View(sPMRole)); }