/// <summary> /// 拉姆达表达式 or 合并 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="first"></param> /// <param name="second"></param> /// <returns></returns> public static Expression <Func <T, bool> > ExpressionOr <T>(this Expression <Func <T, bool> > first, Expression <Func <T, bool> > second) { if (first == null && second == null) { return(null); } else if (first == null && second != null) { return(second); } else if (first != null && second == null) { return(first); } return(first.Combine(second, Expression.Or)); }