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); }
public async Task <IActionResult> GetPage([FromQuery] PurchasePaginationRequest request = null) { return(ApiOk(await PurchaseService.GetPageAsync(request))); }