1、调整盘点任务动态生成查询条件
2、LambdaExpressionExtensions 新增表达式树扩展
This commit is contained in:
@@ -59,6 +59,23 @@ namespace JNPF.Common.Extension
|
||||
|
||||
return first.Compose(second, Expression.And);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// or扩展
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="first"></param>
|
||||
/// <param name="second"></param>
|
||||
/// <returns></returns>
|
||||
public static Expression<Func<T1, T2, T3, bool>> Or<T1, T2, T3>(this Expression<Func<T1, T2, T3, bool>> first, Expression<Func<T1, T2, T3, bool>> second)
|
||||
{
|
||||
if (first.IsNull())
|
||||
{
|
||||
first = second;
|
||||
return first;
|
||||
}
|
||||
return first.Compose(second, Expression.Or);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user