Ejemplo n.º 1
0
        public async Task <PagedResponse <Country> > Paged(CountriesPaged paged)
        {
            var condition = PredicateBuilder.New <CountryEntity>(true);
            Func <IQueryable <CountryEntity>, IOrderedQueryable <CountryEntity> > orderBy =
                query => query.OrderBy(c => c.CountryName);

            var countriesEntities = await _repository.FindManyOrderedPaged(condition, orderBy, paged.CurrentPage, paged.PageSize);

            var countries = _mapper.Map <PagedResponse <Country> >(countriesEntities);

            return(countries);
        }
 public async Task <PagedResponse <Country> > Paged(CountriesPaged paged)
 {
     return(await _manager.Paged(paged));
 }