public async Task <PaginationApiResponse <UserDisplayShortModel> > GetList(int skip, int limit, SortModel sort = null, UserSearchModel search = null) { sort = SortModel.Check(sort); var result = new PaginationApiResponse <UserDisplayShortModel>(skip, limit, 0, new List <UserDisplayShortModel>()); result.Total = (int)await _repositoryUser.Count(x => x.State == MREntityState.Active); var entities = await _repositoryUser.GetSorted(x => x.State == MREntityState.Active, x => x.CreateTime, true, result.Skip, result.Take); if (entities != null && entities.Any()) { result.List = _mapper.Map <List <UserDisplayShortModel> >(entities.ToList()); } return(result); }