public PagedResult <RelationDisplay?> GetPagedResults(int id, int pageNumber = 1, int pageSize = 100) { if (pageNumber <= 0 || pageSize <= 0) { throw new NotSupportedException("Both pageNumber and pageSize must be greater than zero"); } // Ordering do we need to pass through? var relations = _relationService.GetPagedByRelationTypeId(id, pageNumber - 1, pageSize, out long totalRecords); return(new PagedResult <RelationDisplay?>(totalRecords, pageNumber, pageSize) { Items = relations.Select(x => _umbracoMapper.Map <RelationDisplay>(x)) }); }