diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 293affd66..34ae62227 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1010,7 +1010,8 @@ namespace SqlSugar } private ISugarQueryable CopyQueryable() { - var asyncContext = this.Context.CopyContext(this.Context.CurrentConnectionConfig); + var asyncContext = this.Context.CopyContext(this.Context.RewritableMethods.TranslateCopy(this.Context.CurrentConnectionConfig)); + asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true; asyncContext.Ado.IsEnableLogEvent = this.Context.Ado.IsEnableLogEvent; asyncContext.Ado.LogEventStarting = this.Context.Ado.LogEventStarting; asyncContext.Ado.LogEventCompleted = this.Context.Ado.LogEventCompleted;