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