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")] AspNetUserRoles aspNetUserRoles)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUserRoles).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.RoleId = new SelectList(db.AspNetRoles, "Id", "Name", aspNetUserRoles.RoleId);
     ViewBag.UserId = new SelectList(db.AspNetUsers, "Id", "Email", aspNetUserRoles.UserId);
     return(View(aspNetUserRoles));
 }
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetUserRoles aspNetUserRoles = db.AspNetUserRoles.Find(id);

            if (aspNetUserRoles == null)
            {
                return(HttpNotFound());
            }
            return(View(aspNetUserRoles));
        }
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetUserRoles aspNetUserRoles = db.AspNetUserRoles.Find(id);

            if (aspNetUserRoles == null)
            {
                return(HttpNotFound());
            }
            ViewBag.RoleId = new SelectList(db.AspNetRoles, "Id", "Name", aspNetUserRoles.RoleId);
            ViewBag.UserId = new SelectList(db.AspNetUsers, "Id", "Email", aspNetUserRoles.UserId);
            return(View(aspNetUserRoles));
        }