mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Optimize the code
This commit is contained in:
@@ -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.Value is Guid guid && guid == Guid.Empty)
|
||||
if (isPk && item.PropertyType == UtilConstants.GuidType && item.Value is Guid guid && guid == Guid.Empty)
|
||||
{
|
||||
if (StaticConfig.CustomGuidFunc != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user