diff --git a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs index db3a182a5..aa4cfd333 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs @@ -249,7 +249,7 @@ namespace SqlSugar } private IDeleteable CopyDeleteable() { - var asyncContext = this.Context.Utilities.CopyCurrentContext(this.Context,true); + var asyncContext = this.Context.Utilities.CopyContext(this.Context,true); asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true; var asyncDeleteable = asyncContext.Deleteable(); diff --git a/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableProvider.cs index e337c0b3b..e9f3d8be9 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableProvider.cs @@ -307,7 +307,7 @@ namespace SqlSugar } private IInsertable CopyInsertable() { - var asyncContext = this.Context.Utilities.CopyCurrentContext(this.Context,true); + var asyncContext = this.Context.Utilities.CopyContext(this.Context,true); asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true; var asyncInsertable = asyncContext.Insertable(this.InsertObjs); diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 10be30f9a..d76cdb3ab 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1024,7 +1024,7 @@ namespace SqlSugar foreach (var item in result) { var contextProperty = item.GetType().GetProperty("Context"); - SqlSugarClient newClient = this.Context.Utilities.CopyCurrentContext(this.Context); + SqlSugarClient newClient = this.Context.Utilities.CopyContext(this.Context); contextProperty.SetValue(item, newClient, null); } } @@ -1032,7 +1032,7 @@ namespace SqlSugar } private ISugarQueryable CopyQueryable() { - var asyncContext = this.Context.Utilities.CopyCurrentContext(this.Context,true); + var asyncContext = this.Context.Utilities.CopyContext(this.Context,true); asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true; var asyncQueryable = asyncContext.Queryable().Select(string.Empty); diff --git a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs index 21c1d12fb..181d2087e 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs @@ -311,7 +311,7 @@ namespace SqlSugar } private IUpdateable CopyUpdateable() { - var asyncContext = this.Context.Utilities.CopyCurrentContext(this.Context,true); + var asyncContext = this.Context.Utilities.CopyContext(this.Context,true); asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true; var asyncUpdateable = asyncContext.Updateable(this.UpdateObjs); diff --git a/Src/Asp.Net/SqlSugar/Infrastructure/RewritableMethods.cs b/Src/Asp.Net/SqlSugar/Infrastructure/RewritableMethods.cs index bdc364d0c..bb3d6b2e7 100644 --- a/Src/Asp.Net/SqlSugar/Infrastructure/RewritableMethods.cs +++ b/Src/Asp.Net/SqlSugar/Infrastructure/RewritableMethods.cs @@ -222,7 +222,7 @@ namespace SqlSugar return DeserializeObject(jsonString); } } - public SqlSugarClient CopyCurrentContext(SqlSugarClient context,bool isCopyEvents=false) + public SqlSugarClient CopyContext(SqlSugarClient context,bool isCopyEvents=false) { var newClient = new SqlSugarClient(this.TranslateCopy(context.CurrentConnectionConfig)); newClient.MappingColumns = this.TranslateCopy(context.MappingColumns); diff --git a/Src/Asp.Net/SqlSugar/Interface/IRewritableMethods.cs b/Src/Asp.Net/SqlSugar/Interface/IRewritableMethods.cs index 97faac7b5..fbc68a3b3 100644 --- a/Src/Asp.Net/SqlSugar/Interface/IRewritableMethods.cs +++ b/Src/Asp.Net/SqlSugar/Interface/IRewritableMethods.cs @@ -16,7 +16,7 @@ namespace SqlSugar string SerializeObject(object value); T DeserializeObject(string value); T TranslateCopy(T sourceObject); - SqlSugarClient CopyCurrentContext(SqlSugarClient context, bool isCopyEvents = false); + SqlSugarClient CopyContext(SqlSugarClient context, bool isCopyEvents = false); dynamic DataTableToDynamic(DataTable table); ICacheManager GetCacheInstance(); void RemoveCacheAll();