mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Optimize the code
This commit is contained in:
@@ -460,18 +460,18 @@ AND sql LIKE '%"+tableName+"%'");
|
|||||||
this.Context.Ado.ExecuteCommand($"VACUUM INTO '{fullFileName}'");
|
this.Context.Ado.ExecuteCommand($"VACUUM INTO '{fullFileName}'");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private List<T> GetListOrCache<T>(string cacheKey, string sql)
|
//private List<T> GetListOrCache<T>(string cacheKey, string sql)
|
||||||
{
|
//{
|
||||||
return this.Context.Utilities.GetReflectionInoCacheInstance().GetOrCreate(cacheKey,
|
// return this.Context.Utilities.GetReflectionInoCacheInstance().GetOrCreate(cacheKey,
|
||||||
() =>
|
// () =>
|
||||||
{
|
// {
|
||||||
var isEnableLogEvent = this.Context.Ado.IsEnableLogEvent;
|
// var isEnableLogEvent = this.Context.Ado.IsEnableLogEvent;
|
||||||
this.Context.Ado.IsEnableLogEvent = false;
|
// this.Context.Ado.IsEnableLogEvent = false;
|
||||||
var reval = this.Context.Ado.SqlQuery<T>(sql);
|
// var reval = this.Context.Ado.SqlQuery<T>(sql);
|
||||||
this.Context.Ado.IsEnableLogEvent = isEnableLogEvent;
|
// this.Context.Ado.IsEnableLogEvent = isEnableLogEvent;
|
||||||
return reval;
|
// return reval;
|
||||||
});
|
// });
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user