Пример #1
0
 //
 // GET: /Manage/UsersInJson
 public ActionResult UsersInJson()
 {
     var model = new ManageUsersViewModel();
     model.AppUsers = new List<AppUser>();
     foreach (var u in UserManager.Users)
     {
         var appUser = new AppUser();
         appUser.UserId = u.UserName;
         appUser.Name = u.Email;
         model.AppUsers.Add(appUser);
     }
     return Json(model, JsonRequestBehavior.AllowGet);
 }
Пример #2
0
 //
 // GET: /Manage/Users
 public ActionResult Users()
 {
     var model = new ManageUsersViewModel();
     model.AppUsers = new List<AppUser>();
     foreach (var u in UserManager.Users)
     {
         var appUser = new AppUser();
         appUser.UserId = u.UserName;
         appUser.Name = u.Email;
         model.AppUsers.Add(appUser);
     }
     return View(model);
 }