Like operator and dynamic linq
I am using dynamic linq and was trying to implement contains logic...I need to return
Func<Expression, Expression, bool, MethodInfo, BinaryExpression>
sample code for equal
private static Func<Expression, Expression, bool, MethodInfo, BinaryExpression> GetFuncForOperand(OperatorType operand)
{
case OperatorType.Equal:
func = Expression.Equal;
break;
case OperatorType.NotEqual:
func = Expression.NotEqual;
开发者_如何学Pythonbreak;
case Operatortype.Like
// what should I do
}
how can I express contains ?
Have a look at my blog post, I made my own Like evaluator in c#, complete with unit test.
精彩评论