Ejemplo n.º 1
0
        public ActionResult <Collection <int> > GetNumbers([FromQuery] PagingOptions pagingOptions)
        {
            pagingOptions = _defaultPagingOptions.Replace(pagingOptions);

            var numbers = _numbersService.GetNumbers(pagingOptions);

            var collection = PagedCollection <int> .Create <PagedCollection <int> >(
                Link.ToCollection(nameof(GetNumbers)),
                numbers.Items.ToArray(),
                numbers.TotalSize,
                pagingOptions);

            return(collection);
        }