I am trying to create a where clause for my view using LINQ.
I was able to create single column where clause and I would like now to create multiple column where clauses..
I have seen code to implement in .Net 4 and above, but since I have to use .Net 3.5, I need a quick work around for this. so what I am trying to do is....
Expression leftexp = {tag=>((tag.id=2)||(tag.id=3))}
Expression rightexp = {tag=>((tag.uid="MU")||(tag.uid="ST"))}
from these two expressions i would like to create
BinaryExpression be = {tag=>((tag.id=2)||(tag.id=3))} &&
{tag=>((tag.uid="MU")||(tag.uid="ST"))}
something like this which i could pass to my where clause in LINQ.
I tried to use Expression.And(leftexp,rightexp)
but got the error..
The binary operator And is not defined for the types
'System.Func2[WebApplication1.View_MyView,System.Boolean]' and 'System.Func
2[WebApplication1.View_MyView,System.Boolean]'.
Expression is new for me and might have looked at too much of code so a bit confused to how to go about doing this... would really appreciate if you could point me in the right direction.