mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Synchronization code
This commit is contained in:
parent
f1015e2955
commit
85979d4bfc
@ -194,9 +194,20 @@ namespace SqlSugar
|
||||
.ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
var isIdentity = this._Context.EntityMaintenance.GetEntityInfo(typeof(TChild)).Columns.Any(it => it.IsIdentity);
|
||||
if (isIdentity)
|
||||
{
|
||||
foreach (var item in insertData)
|
||||
{
|
||||
this._Context.Insertable(insertData).ExecuteCommandIdentityIntoEntity();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Context.Insertable(insertData).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user