From 0044acf12368ac1272a4accfa094b5ba42e07ced Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 18 Sep 2017 16:20:37 +0800 Subject: [PATCH] - --- .../ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs | 2 +- .../SqlServerTest/src/SqlSugar/SqlSugarForCore.nuspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs index f53d9e5fa..d3bb16e88 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs @@ -21,7 +21,7 @@ namespace SqlSugar var isBool = expression.Type == UtilConstants.BoolType; var isValueBool = isValue && isBool && parameter.BaseExpression == null; var isLength = memberName == "Length" && childIsMember && childExpression.Type == UtilConstants.StringType; - var isDateValue = memberName.IsIn(Enum.GetNames(typeof(DateType))) && (expression.Expression as MemberExpression).Type == UtilConstants.DateType; + var isDateValue = memberName.IsIn(Enum.GetNames(typeof(DateType))) &&(childIsMember&&childExpression.Type == UtilConstants.DateType); var isLogicOperator = ExpressionTool.IsLogicOperator(baseParameter.OperatorValue) || baseParameter.OperatorValue.IsNullOrEmpty(); var isHasValue = isLogicOperator && memberName == "HasValue" && expression.Expression != null && expression.NodeType == ExpressionType.MemberAccess; var isDateDate = memberName == "Date" && expression.Expression.Type == UtilConstants.DateType; diff --git a/Src/Asp.NetCore1_StopUpdate/SqlServerTest/src/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore1_StopUpdate/SqlServerTest/src/SqlSugar/SqlSugarForCore.nuspec index 181344fc3..87132fdb8 100644 --- a/Src/Asp.NetCore1_StopUpdate/SqlServerTest/src/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore1_StopUpdate/SqlServerTest/src/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ sqlSugarCore - 4.5.2.2 + 4.5.2.3 sunkaixuan Landa http://www.apache.org/licenses/LICENSE-2.0.html