mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
修复 ISelect2 以上 WhereIf 条件作用反了 bug
This commit is contained in:
@ -145,10 +145,9 @@ namespace FreeSql.Internal.CommonProvider {
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp) {
|
||||
if (condition) return this.Where(null);
|
||||
if (exp == null) return this.Where(null);
|
||||
if (condition == false || exp == null) return this;
|
||||
for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
|
||||
return condition ? this.Where(_commonExpression.ExpressionWhereLambda(_tables, exp?.Body, null)) : this;
|
||||
return this.Where(_commonExpression.ExpressionWhereLambda(_tables, exp?.Body, null));
|
||||
}
|
||||
|
||||
bool ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.Any(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp) {
|
||||
|
Reference in New Issue
Block a user