From ef2ed0df5f2ac5ba8dc35ac41a405ca4d94189f9 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 8 May 2025 15:29:44 +0800 Subject: [PATCH] Optimize performance --- .../SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs | 2 +- Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs index 889b4e499..2df841b37 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs @@ -42,7 +42,7 @@ namespace SqlSugar foreach (var item in InsertBuilder.DbColumnInfoList) { var isPk = pks.Any(y => y.Equals(item.DbColumnName, StringComparison.CurrentCultureIgnoreCase)) || item.IsPrimarykey; - if (isPk && item.PropertyType == UtilConstants.GuidType && item.Value.ObjToString() == Guid.Empty.ToString()) + if (isPk && item.Value is Guid guid && guid == Guid.Empty) { if (StaticConfig.CustomGuidFunc != null) { diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec index 70b923830..0a7538e1f 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ SqlSugarCore - 5.1.4.192 + 5.1.4.193-preview01 sunkaixuan 果糖大数据科技 http://www.apache.org/licenses/LICENSE-2.0.html