mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
v1.10.0-preview1018 #490
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
|
||||
<Version>1.10.0-preview1015</Version>
|
||||
<Version>1.10.0-preview1018</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>FreeSql;ncc;YeXiangQin</Authors>
|
||||
<Description>FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Firebird, Odbc, 达梦, 人大金仓, 神舟通用, And Access</Description>
|
||||
|
@ -680,8 +680,10 @@ namespace FreeSql.Internal
|
||||
case ExpressionType.ConvertChecked:
|
||||
//var othercExp = ExpressionLambdaToSqlOther(exp, tsc);
|
||||
//if (string.IsNullOrEmpty(othercExp) == false) return othercExp;
|
||||
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)
|
||||
var expOperand = (exp as UnaryExpression)?.Operand;
|
||||
if (expOperand.Type.NullableTypeOrThis().IsEnum && exp.IsParameter() == false)
|
||||
return formatSql(Expression.Lambda(exp).Compile().DynamicInvoke(), tsc.mapType, tsc.mapColumnTmp, tsc.dbParams); //bug: Where(a => a.Id = (int)enum)
|
||||
return ExpressionLambdaToSql(expOperand, tsc);
|
||||
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