Can you help me with next: I'd like to add variable count of SqlMethods.Like() in one query?
For example: I've four words in list catCode, how can I create LINQ query with four SqlMethods.Like()?
using (var db = new MappingDataContext(_connection))
{
db.ObjectTrackingEnabled = false;
return (
from r in db.U_CDW_REPORTs
where (catCode.Length > 0 ?
SqlMethods.Like(r.CATEGORY, catCode) : r.CATEGORY != "*")
where r.SI_QTY > 0
orderby r.SI_QTY descending
select new Item
{
...
}).ToList();
}