From 9a4e2b58999b0bf96c307a35cfa4dab5c685384a Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 4 Apr 2023 20:36:15 +0800 Subject: [PATCH] Update db.MasterSqlQuery --- Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs index 12d0dfc15..8cfcb5a24 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs @@ -927,6 +927,7 @@ namespace SqlSugar var oldValue = this.Context.Ado.IsDisableMasterSlaveSeparation; this.Context.Ado.IsDisableMasterSlaveSeparation = true; var result = this.Context.Ado.SqlQuery(sql, parameters); + this.Context.Ado.IsDisableMasterSlaveSeparation = oldValue; return result; } public async Task> MasterSqlQueryAasync(string sql, object parameters = null)