Example #1
0
        public async Task <IEnumerable <Pizza> > GetPizzas(int page, int pageSize, [FromBody] FilterParams filter)
        {
            var paged = new Page()
            {
                PageNumber = page,
                PageSize   = pageSize,
            };
            await _pageValidator.ValidateAndThrowAsync(paged);

            return(_repository.GetByPage(paged));
        }