- 修复 OR 表达式处理情况;#1047

This commit is contained in:
2881099
2022-03-18 20:44:41 +08:00
parent 5dc014bc7c
commit 203681ea6a
2 changed files with 11 additions and 0 deletions

View File

@ -591,6 +591,8 @@ namespace FreeSql.Internal
if (rightExp.Type.NullableTypeOrThis() == typeof(TimeSpan))
return ExpressionLambdaToSql(Expression.Call(leftExp, MethodDateTimeSubtractTimeSpan, rightExp), tsc);
}
if (oper == "OR")
return $"({GetBoolString(ExpressionLambdaToSql(leftExp, tsc))} {oper} {GetBoolString(ExpressionLambdaToSql(rightExp, tsc))})";
return $"({ExpressionLambdaToSql(leftExp, tsc)} {oper} {ExpressionLambdaToSql(rightExp, tsc)})";
case "=":
case "<>":