Ejemplo n.º 1
0
        public async Task <PagedResult <PlayerResponse> > GetPageAsync(PlayerPaginationRequest request)
        {
            PagedResult <PlayerResponse> pagedResult = await _context
                                                       .Players.AsQueryable()
                                                       .Select(i => new PlayerResponse
            {
                Id       = i.Id,
                LastName = i.LastName
            })
                                                       .ToPagedResultAsync(request);

            return(pagedResult);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetPage([FromQuery] PlayerPaginationRequest request = null)
        {
            PagedResult <PlayerResponse> pagedResult = await Players.GetPageAsync(request);

            return(ApiOk(pagedResult));
        }