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)