Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        // 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);
        }