mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Synchronization code
This commit is contained in:
parent
f1015e2955
commit
85979d4bfc
@ -194,9 +194,20 @@ namespace SqlSugar
|
|||||||
.ExecuteCommand();
|
.ExecuteCommand();
|
||||||
}
|
}
|
||||||
else
|
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();
|
this._Context.Insertable(insertData).ExecuteCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user