|
|
@ -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<T> 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<ExpandoObject>().Select<T>(string.Empty); |
|
|
|