I have a requirement to add multiple where conditions with or operator out of which one where condition will have to check if the db column has any of the item in a list provided. Please consider the query below
var res= from table1 in context.table1
join table2 in context.table2
on table1.id equals table2.id
where table1.name=="res1" || table1.description=="desc"
|| table1.name.any(res=>FreeText.Contains(res))
select table1
this query is leading the compiler to run query multiple times and I am not getting required result. My end goal is to achieve the following sql query
select * from table1 join table2 on table1.id ==table2.id
where table1.name=="res1" || table1.description=="desc" || table1.name like "%item1%" ||table1.name like "%item2% ......"
the like statements should be dynamically added based on the items in the list.