mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Code optimization
This commit is contained in:
parent
4062919c02
commit
b4a0a9b33c
@ -920,14 +920,14 @@ namespace SqlSugar
|
||||
#endregion
|
||||
|
||||
#region Helper
|
||||
private void TaskStart<Type>(Task<Type> result)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
{
|
||||
Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
}
|
||||
result.Start();
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
//{
|
||||
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
// {
|
||||
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
// }
|
||||
// result.Start();
|
||||
//}
|
||||
private void ExecuteProcessingSQL(ref string sql, SugarParameter[] parameters)
|
||||
{
|
||||
var result = this.ProcessingEventStartingSQL(sql, parameters);
|
||||
|
@ -346,14 +346,14 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
|
||||
private void TaskStart<Type>(Task<Type> result)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
{
|
||||
Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
}
|
||||
result.Start();
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
//{
|
||||
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
// {
|
||||
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
// }
|
||||
// result.Start();
|
||||
//}
|
||||
|
||||
private void AutoRemoveDataCache()
|
||||
{
|
||||
|
@ -399,14 +399,14 @@ namespace SqlSugar
|
||||
return this.EntityInfo.Columns.Where(it => it.IsIdentity).Select(it => it.DbColumnName).ToList();
|
||||
}
|
||||
}
|
||||
private void TaskStart<Type>(Task<Type> result)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
{
|
||||
Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
}
|
||||
result.Start();
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
//{
|
||||
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
// {
|
||||
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
// }
|
||||
// result.Start();
|
||||
//}
|
||||
protected void RestoreMapping()
|
||||
{
|
||||
if (IsAs)
|
||||
|
@ -957,14 +957,14 @@ namespace SqlSugar
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
private void TaskStart<Type>(Task<Type> result)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
{
|
||||
Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
}
|
||||
result.Start();
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
//{
|
||||
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
// {
|
||||
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
// }
|
||||
// result.Start();
|
||||
//}
|
||||
protected ISugarQueryable<TResult> _Select<TResult>(Expression expression)
|
||||
{
|
||||
QueryBuilder.CheckExpression(expression, "Select");
|
||||
|
@ -583,14 +583,14 @@ namespace SqlSugar
|
||||
this.Context.MappingTables = OldMappingTableList;
|
||||
}
|
||||
}
|
||||
private void TaskStart<Type>(Task<Type> result)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
{
|
||||
Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
}
|
||||
result.Start();
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
//{
|
||||
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
// {
|
||||
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
// }
|
||||
// result.Start();
|
||||
//}
|
||||
//private IUpdateable<T> CopyUpdateable()
|
||||
//{
|
||||
// var asyncContext = this.Context.Utilities.CopyContext(true);
|
||||
|
@ -794,14 +794,14 @@ namespace SqlSugar
|
||||
_Context = Tenant.Context;
|
||||
this.CurrentConnectionConfig = Tenant.ConnectionConfig;
|
||||
}
|
||||
private void TaskStart<Type>(Task<Type> result)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
{
|
||||
Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
}
|
||||
result.Start();
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
//{
|
||||
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||
// {
|
||||
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
|
||||
// }
|
||||
// result.Start();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region Obsolete
|
||||
|
Loading…
Reference in New Issue
Block a user