This query is ok:
from a in context.employee.where(a=>a.time > sometime && a.time.addmin(60) < sometime || a.time < someothertime).
But if I add () to make sure the and comes before the or, compiler doens’t recognized the 2nd a:
from a in context.employee.where((a=>a.time > sometime && a.time.AddMinutes(60) < sometime) || a.time < someother time)).
This time:
Operator ‘||’ cannot be applied to operands of type ‘lambda expression’ and ‘lambda expression’
How can use use OR in linq to entities with and in the same where clause ?
shouldnt it be
note the a => in your non working one is within inner brackets