I have two expression trees of type : Expression<Func<string, bool>>
and I would like to obtain a single Expression that will do the OR of the two expressions (passing the same string parameter to both expressions)
Any idea?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You can use
PredicateBuilder
from LINQKit to do this. For example:You can try combining them in a
Expression.Lambda
expression and then usingExpression.Or
to check if one of them is true.Here is an example:
Maybe you can get more info here