public async Task <IActionResult> GetList([FromQuery] PaginationFilterDto paginationDto) { var pagination = _mapper.Map <Pagination>(paginationDto); var(municipalities, totalCount) = await _municipalityService.GetMunicipalities(pagination); var vws = _mapper.Map <List <MunicipalityApiVw> >(municipalities); var route = Request.Path.Value; var responce = PaginationHelper.CreatePagedReponse <MunicipalityApiVw>(vws, pagination, totalCount, _uriService, route); return(Ok(responce)); }
public async Task <List <MunicipalityVw> > GetMunicipalitiesAsync() { var(municipalites, totalCount) = await _municipalityService.GetMunicipalities(); return(_mapper.Map <List <MunicipalityVw> >(municipalites)); }