mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update InsertNav
This commit is contained in:
parent
51f89e37ae
commit
0937565930
@ -96,6 +96,17 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
this._Context.Insertable(insertData).ExecuteCommand();
|
this._Context.Insertable(insertData).ExecuteCommand();
|
||||||
}
|
}
|
||||||
|
else if (pkColumn.UnderType == UtilConstants.GuidType && pkColumn.IsIdentity == false)
|
||||||
|
{
|
||||||
|
foreach (var child in insertData)
|
||||||
|
{
|
||||||
|
if (IsDefaultValue(pkColumn.PropertyInfo.GetValue(child)))
|
||||||
|
{
|
||||||
|
pkColumn.PropertyInfo.SetValue(child, Guid.NewGuid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._Context.Insertable(insertData).ExecuteCommand();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this._Context.Insertable(insertData).ExecuteCommand();
|
this._Context.Insertable(insertData).ExecuteCommand();
|
||||||
|
Loading…
Reference in New Issue
Block a user