mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-21 18:48:27 +08:00
UpdateNav OptLock
This commit is contained in:
@@ -180,6 +180,17 @@ namespace SqlSugar
|
||||
_ParentList = _RootList = newRoots.Cast<object>().ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_Roots.Count() == 1 && _RootOptions?.IsOptLock==true)
|
||||
{
|
||||
this._Context.Updateable(_Roots.First())
|
||||
.EnableDiffLogEventIF(_RootOptions.IsDiffLogEvent, _RootOptions.DiffLogBizData)
|
||||
.UpdateColumns(_RootOptions.UpdateColumns)
|
||||
.IgnoreColumns(_RootOptions.IgnoreColumns)
|
||||
.IgnoreNullColumns(_RootOptions.IsIgnoreAllNullColumns)
|
||||
.ExecuteCommandWithOptLockIF(_RootOptions?.IsOptLock, _RootOptions?.IsOptLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Context.Updateable(_Roots)
|
||||
.EnableDiffLogEventIF(_RootOptions.IsDiffLogEvent, _RootOptions.DiffLogBizData)
|
||||
@@ -189,6 +200,7 @@ namespace SqlSugar
|
||||
.ExecuteCommandWithOptLockIF(_RootOptions?.IsOptLock, _RootOptions?.IsOptLock);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_RootOptions != null && _RootOptions?.IsDiffLogEvent == true)
|
||||
{
|
||||
this._Context.Updateable(_Roots).EnableDiffLogEvent(_RootOptions.DiffLogBizData).ExecuteCommand();
|
||||
|
||||
Reference in New Issue
Block a user