public async Task <IEnumerable <Ingredient> > GetIngredient(int page, int pageSize, [FromBody] FilterParams filter) { var paged = new Page { PageNumber = page, PageSize = pageSize }; await _pageValidator.ValidateAndThrowAsync(paged); return(_repository.GetByPage(paged)); }