Beispiel #1
0
        private void CreateLinksForEncounters(LinkedResourceBaseDto wrapper,
                                              string orderBy, string facilityName, DateTime searchFrom, DateTime searchTo, int pageNumber, int pageSize, bool hasNext, bool hasPrevious)
        {
            wrapper.Links.Add(
                new LinkDto(
                    _linkGeneratorService.CreateEncountersResourceUri(ResourceUriType.Current, orderBy, facilityName, pageNumber, pageSize),
                    "self", "GET"));

            if (hasNext)
            {
                wrapper.Links.Add(
                    new LinkDto(
                        _linkGeneratorService.CreateEncountersResourceUri(ResourceUriType.NextPage, orderBy, facilityName, pageNumber, pageSize),
                        "nextPage", "GET"));
            }

            if (hasPrevious)
            {
                wrapper.Links.Add(
                    new LinkDto(
                        _linkGeneratorService.CreateEncountersResourceUri(ResourceUriType.PreviousPage, orderBy, facilityName, pageNumber, pageSize),
                        "previousPage", "GET"));
            }
        }