mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Update auto nolcok
This commit is contained in:
parent
eccf3dfaca
commit
02f57c0988
@ -2422,7 +2422,7 @@ namespace SqlSugar
|
||||
if (this.QueryBuilder.AsTables != null && this.QueryBuilder.AsTables.Count==1)
|
||||
{
|
||||
var tableinfo = this.QueryBuilder.AsTables.First();
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockQuery == true)
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockQuery == true&& this.QueryBuilder.AsTables.First().Value.ObjToString().Contains(SqlWith.NoLock) ==false)
|
||||
{
|
||||
this.QueryBuilder.AsTables[tableinfo.Key] = " (SELECT * FROM " + this.QueryBuilder.AsTables.First().Value + $" {SqlWith.NoLock} )";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user