Linq 合并多个查询条件
方法
public static Expression<Func<T, T2, T3, T4,T5, bool>> AndFive<T, T2, T3, T4,T5>(this Expression<Func<T, T2, T3, T4,T5, bool>> expr1, Expression<Func<T, T2, T3, T4,T5, bool>> expr2) { //创建新参数 return Expression.Lambda<Func<T, T2, T3, T4, T5, bool>>(Expression.AndAlso(expr1.Body, expr2.Body), expr1.Parameters); }