public async Task <IReadOnlyCollection <Product> > IsSatisfiedBy(ProductSearchQueryParams parameters) { var query = new QueryExpression <Product>(); if (parameters.MaxPrice.HasValue) { query.AddWhereExpression(x => x.Price <= parameters.MaxPrice.Value); } if (parameters.Size.HasValue) { query.AddWhereExpression(x => x.Sizes.Contains(parameters.Size.Value)); } var queryResult = await _productsRepository.GetAll(query, parameters.Url); return(queryResult); }