public IActionResult GetPerfils([FromQuery] PerfilQueryFilter filtros) { var perfiles = _perfilService.GetPerfils(filtros); var perfilesDtos = _mapper.Map <IEnumerable <PerfilDto> >(perfiles); var metaData = new MetaData { TotalCount = perfiles.TotalCount, PageSize = perfiles.PageSize, CurrentPage = perfiles.CurrentPage, TotalPages = perfiles.TotalPages, HasNextPage = perfiles.HasNextPage, HasPreviousPage = perfiles.HasPreviousPage, NextPageUrl = _uriService.GetPerfilPaginationUri(filtros, Url.RouteUrl(nameof(GetPerfils))).ToString(), PreviousPageUrl = _uriService.GetPerfilPaginationUri(filtros, Url.RouteUrl(nameof(GetPerfils))).ToString() }; var response = new ApiResponse <IEnumerable <PerfilDto> >(perfilesDtos) { Meta = metaData }; Response.Headers.Add("x-Pagination", JsonConvert.SerializeObject(metaData)); return(Ok(response)); }