Ejemplo n.º 1
0
        public async Task <IActionResult> GetBuildingsPagination([FromQuery] BuildingUserParams userParams)
        {
            var bldgs = await _buildingService.GetBuildingsPagination(userParams);

            var bldgsToReturn = _mapper.Map <IEnumerable <Building> >(bldgs);

            Response.AddPagination(bldgs.CurrentPage,
                                   bldgs.PageSize,
                                   bldgs.TotalCount,
                                   bldgs.TotalPages);

            return(Ok(bldgsToReturn));
        }