public async Task<List<IApplicationUser>> GetAsync(UserFilter filter = null)
 {
     try
     {
         if (filter != null)
         {
             return Mapper.Map<List<IApplicationUser>>(
                 await UserManager.Users
                 .OrderBy(u => u.UserName)
                 .Skip((filter.PageNumber - 1) * filter.PageSize)
                 .Take(filter.PageSize)
                 .ToListAsync());
         }
         else
         {
             return Mapper.Map<List<IApplicationUser>>(
                await UserManager.Users.ToListAsync());
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #2
0
 public Task<List<IApplicationUser>> GetAsync(UserFilter filter = null)
 {
     return Repository.GetAsync(filter);
 }