public static IEnumerable <UserViewModel> GetAllUsers(this ApplicationUserManager userManager,
                                                       ApplicationRoleManager roleManager)
 {
     return
         (from user in userManager.Users.ToList() //load to memory, because linq2entities cannot handle IsInRole..
          let isAdmin = userManager.IsInRole(user.Id, Role.Admin)
                        let roles = roleManager.GetUserRoles(user.Roles)
                                    orderby user.UserName ascending
                                    select new UserViewModel
     {
         Id = user.Id,
         Username = user.UserName,
         Email = user.Email,
         EmailConfirmed = user.EmailConfirmed,
         IsAdmin = isAdmin,
         Roles = roles,
     });
 }