From f137a4ade16ecb0137485af38306b55da370b2af Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 19 Oct 2022 14:19:00 +0800 Subject: [PATCH] Synchronization code --- .../Abstract/DbBindProvider/IDataRecordExtensions.cs | 9 ++++++++- .../ResolveItems/MethodCallExpressionResolve.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs index 3f68e0780..f22832349 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs @@ -324,7 +324,14 @@ namespace SqlSugar var valueType = value.GetType(); if (valueType.IsIn(UtilConstants.FloatType, UtilConstants.DecType, UtilConstants.DobType)) { - value = Convert.ToUInt32(value); + if (Convert.ToDecimal(value) < 0) + { + value = Convert.ToInt32(value); + } + else + { + value = Convert.ToUInt32(value); + } } else if (valueType == UtilConstants.StringType) { diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs index e107af193..1e785d762 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs @@ -368,7 +368,7 @@ namespace SqlSugar model.Args.Add(data); if (args.Count() == 2) { - data.MemberName = (args.Last()).ToString(); + data.MemberName = (args.Last()).ToString().Replace("\"",""); data.MemberValue = "." ; } }