public ActionResult DeleteConfirmed(string id) { ASPNetUserRoles aSPNetUserRoles = db.ASPNetUserRoles.Find(id); db.ASPNetUserRoles.Remove(aSPNetUserRoles); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "UserId,RoleId,MemberName,RoleName")] ASPNetUserRoles aSPNetUserRoles) { if (ModelState.IsValid) { db.Entry(aSPNetUserRoles).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aSPNetUserRoles)); }
public ActionResult Create([Bind(Include = "UserId,RoleId,MemberName,RoleName")] ASPNetUserRoles aSPNetUserRoles) { if (ModelState.IsValid) { db.ASPNetUserRoles.Add(aSPNetUserRoles); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aSPNetUserRoles)); }
// GET: ASPNetUserRoles/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ASPNetUserRoles aSPNetUserRoles = db.ASPNetUserRoles.Find(id); if (aSPNetUserRoles == null) { return(HttpNotFound()); } return(View(aSPNetUserRoles)); }
// GET: ASPNetUserRoles/Edit/5 public ActionResult Edit(string id, string role) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ASPNetUserRoles aSPNetUserRoles = db.ASPNetUserRoles.Find(id, role); aSPNetUserRoles.RoleName = Helpers.ASPNetUserRoles.GetRole(db, aSPNetUserRoles.RoleId); aSPNetUserRoles.UserId = Helpers.ASPNetUserRoles.GetUserName(db, aSPNetUserRoles.UserId); if (aSPNetUserRoles == null) { return(HttpNotFound()); } return(View(aSPNetUserRoles)); }