Exemplo n.º 1
0
        public async Task <IActionResult> GetBuildingTypesPagination([FromQuery] PagUserParams userParams)
        {
            var buildingTypes = await _buildingService.GetBuildingTypesPagination(userParams);

            var bldgTypesToReturn = _mapper.Map <IEnumerable <BuildingTypeDataDto> >(buildingTypes);

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

            return(Ok(bldgTypesToReturn));
        }