mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Async Cache BUG
This commit is contained in:
parent
980e22b201
commit
2d842667d0
@ -8,6 +8,6 @@ namespace ExtensionsDemo
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
public static string ConnectionString = "server=.;uid=sa;pwd=sasa;database=SqlSugar4XTest";
|
||||
public static string ConnectionString = "server=.;uid=sa;pwd=@jhl85661501;database=SqlSugar4XTest";
|
||||
}
|
||||
}
|
||||
|
@ -1269,7 +1269,7 @@ namespace SqlSugar
|
||||
var asyncContext = this.Context.Utilities.CopyContext(true);
|
||||
asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true;
|
||||
|
||||
var asyncQueryable = asyncContext.Queryable<ExpandoObject>().Select<T>(string.Empty);
|
||||
var asyncQueryable = asyncContext.Queryable<ExpandoObject>().Select<T>(string.Empty).WithCacheIF(IsCache, CacheTime);
|
||||
var asyncQueryableBuilder = asyncQueryable.QueryBuilder;
|
||||
asyncQueryableBuilder.Take = this.QueryBuilder.Take;
|
||||
asyncQueryableBuilder.Skip = this.QueryBuilder.Skip;
|
||||
|
@ -269,6 +269,7 @@ namespace SqlSugar
|
||||
public SqlSugarClient CopyContext(bool isCopyEvents = false)
|
||||
{
|
||||
var newClient = new SqlSugarClient(this.TranslateCopy(Context.CurrentConnectionConfig));
|
||||
newClient.CurrentConnectionConfig.ConfigureExternalServices=Context.CurrentConnectionConfig.ConfigureExternalServices;
|
||||
newClient.MappingColumns = this.TranslateCopy(Context.MappingColumns);
|
||||
newClient.MappingTables = this.TranslateCopy(Context.MappingTables);
|
||||
newClient.IgnoreColumns = this.TranslateCopy(Context.IgnoreColumns);
|
||||
|
Loading…
Reference in New Issue
Block a user