开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜