public ActionResult Edit(string id) { ApplicationUser user = UserManager.Users.ToList().Find(u => u.Id == id); if (user == null) { return HttpNotFound(); } ApplicationUserVM vm = new ApplicationUserVM { Id = user.Id, Login = user.UserName, IsAdmin = Roles.IsUserInRole(user.UserName, "Admin") }; return View(vm); }
// GET: Assistances/Delete/5 public ActionResult Delete(string id) { ApplicationUser user = UserManager.Users.ToList().Find(u => u.Id == id); if (user == null) { return HttpNotFound(); } ApplicationUserVM vm = new ApplicationUserVM { Id = user.Id, Login = user.UserName }; return View(vm); }