Afternoon, I am trying to make a simple search, which is working for the product title. However i need to add other parameters in for the search. I have the basis of the code below, at least what i think it should be. I have commented out the other items
Could someone please provide some guidance on this as i am stuck on it atm.
var query = from a in dc.aProducts
join t in dc.bProducts on a.sku equals t.sku
where SqlMethods.Like(t.title, "%" + productName + "%")
//Compare Prices
//&& (p => (double)p.Price >= priceFrom && (double)p.Price <= priceTo)
//Product SKU
//t.sku == productSku
//Product Brand
//t.brand == productBrand
//a.asin == productAsin
//a.Live == IsLive
Many thanks in advance, all help is much appreciated.
I’d be tempted to do something like this:
Etc.
Each time you are conditionally adding filters to your original query.