mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Update: db.UpdateNav
This commit is contained in:
@@ -86,6 +86,16 @@ namespace SqlSugar
|
|||||||
com(updateable);
|
com(updateable);
|
||||||
updateable.ExecuteCommand();
|
updateable.ExecuteCommand();
|
||||||
}
|
}
|
||||||
|
else if (pkColumn.IsPrimarykey == false)
|
||||||
|
{
|
||||||
|
var pk= this._Context.EntityMaintenance.GetEntityInfo<TChild>().Columns.Where(it => it.IsPrimarykey);
|
||||||
|
List<string> ignoreColumns = new List<string>();
|
||||||
|
if (pk.Any())
|
||||||
|
{
|
||||||
|
ignoreColumns.AddRange(pk.Select(it=>it.PropertyName));
|
||||||
|
}
|
||||||
|
x.AsUpdateable.IgnoreColumns(ignoreColumns.ToArray()).ExecuteCommand();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x.AsUpdateable.ExecuteCommand();
|
x.AsUpdateable.ExecuteCommand();
|
||||||
|
Reference in New Issue
Block a user