mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Optimize the code
This commit is contained in:
@@ -42,7 +42,7 @@ namespace SqlSugar
|
|||||||
foreach (var item in InsertBuilder.DbColumnInfoList)
|
foreach (var item in InsertBuilder.DbColumnInfoList)
|
||||||
{
|
{
|
||||||
var isPk = pks.Any(y => y.Equals(item.DbColumnName, StringComparison.CurrentCultureIgnoreCase)) || item.IsPrimarykey;
|
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)
|
if (StaticConfig.CustomGuidFunc != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user