Optimize performance

This commit is contained in:
sunkaixuan
2025-05-08 15:29:44 +08:00
parent 8c4d36f0ba
commit ef2ed0df5f
2 changed files with 2 additions and 2 deletions

View File

@@ -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)
{

View File

@@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.4.192</version>
<version>5.1.4.193-preview01</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>