コード例 #1
0
 public List <BeerViewmodel> GetBeers(int page)
 {
     //Page 1 is the minimum
     return(_beerMapperProfile.MapRange(
                _beerManager.GetAll()
                .Skip((page - 1) * Constants.BeersPerPage)
                .Take(Constants.BeersPerPage)
                .ToList()));
 }
コード例 #2
0
 public IEnumerable <Beer> Get([FromQuery] string name, [FromQuery] string sort_by)
 {
     return(_beerManager.GetAll(name, sort_by));
 }