Hi,
I am facing a similar problem for IN Clause of the SQL.
I am using the dynamic expressions to build the lambda expression for applying the IN clause . I have used the code like below to generate the lambda expression.
Expression.Call(ContainsMethodInfo, new Expression[] { rightExp, leftOp })
ContainsMethodInfo:- It is the MethodInfo type object having the information regarding the information for "Contains" method of IEnumerable interface.
rightExp:= this contains the expression for list of values for which data is searched
leftOp := This is the expression for the field in which search to be made.
My problem is that , it works for the long type of fields ,but not for String type of field.
Let me know if more information is required.
Devanand