mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 修复 lambda 表达式解析变量转换时的 bug;#490
This commit is contained in:
@ -680,7 +680,8 @@ namespace FreeSql.Internal
|
||||
case ExpressionType.ConvertChecked:
|
||||
//var othercExp = ExpressionLambdaToSqlOther(exp, tsc);
|
||||
//if (string.IsNullOrEmpty(othercExp) == false) return othercExp;
|
||||
return ExpressionLambdaToSql((exp as UnaryExpression)?.Operand, tsc);
|
||||
if (exp.IsParameter()) return ExpressionLambdaToSql((exp as UnaryExpression)?.Operand, tsc);
|
||||
return formatSql(Expression.Lambda(exp).Compile().DynamicInvoke(), tsc.mapType, tsc.mapColumnTmp, tsc.dbParams); //bug: Where(a => a.Id = (int)enum)
|
||||
case ExpressionType.Negate:
|
||||
case ExpressionType.NegateChecked: return "-" + ExpressionLambdaToSql((exp as UnaryExpression)?.Operand, tsc);
|
||||
case ExpressionType.Constant: return formatSql((exp as ConstantExpression)?.Value, tsc.mapType, tsc.mapColumnTmp, null);
|
||||
|
Reference in New Issue
Block a user