예제 #1
0
        public async Task <PagedResult <PurchasesList> > GetPageAsync(PurchasePaginationRequest request)
        {
            var pagedResult = await _context
                              .Purchases
                              .Include(c => c.Game)
                              .Include(c => c.User)
                              .ProjectTo <PurchasesList>(_mapper.ConfigurationProvider)
                              .ToPagedResultAsync(request);

            return(pagedResult);
        }
예제 #2
0
 public async Task <IActionResult> GetPage([FromQuery] PurchasePaginationRequest request = null)
 {
     return(ApiOk(await PurchaseService.GetPageAsync(request)));
 }