mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Update core
This commit is contained in:
@@ -93,6 +93,7 @@ namespace SqlSugar
|
|||||||
var result = await buider.UpdateByTempAsync(GetTableName(), dt.TableName, updateColumns, whereColumns);
|
var result = await buider.UpdateByTempAsync(GetTableName(), dt.TableName, updateColumns, whereColumns);
|
||||||
this.context.DbMaintenance.DropTable(dt.TableName);
|
this.context.DbMaintenance.DropTable(dt.TableName);
|
||||||
this.context.CurrentConnectionConfig.IsAutoCloseConnection = isAuto;
|
this.context.CurrentConnectionConfig.IsAutoCloseConnection = isAuto;
|
||||||
|
buider.CloseDb();
|
||||||
End(datas);
|
End(datas);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@@ -13,5 +13,6 @@ namespace SqlSugar
|
|||||||
Task<int> UpdateByTempAsync(string tableName,string tempName,string [] updateColumns,string[] whereColumns);
|
Task<int> UpdateByTempAsync(string tableName,string tempName,string [] updateColumns,string[] whereColumns);
|
||||||
Task<int> ExecuteBulkCopyAsync(DataTable dt);
|
Task<int> ExecuteBulkCopyAsync(DataTable dt);
|
||||||
Task CreateTempAsync<T>(DataTable dt) where T : class, new();
|
Task CreateTempAsync<T>(DataTable dt) where T : class, new();
|
||||||
|
void CloseDb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@ namespace SqlSugar
|
|||||||
public interface IFastest<T>
|
public interface IFastest<T>
|
||||||
{
|
{
|
||||||
IFastest<T> AS(string tableName);
|
IFastest<T> AS(string tableName);
|
||||||
|
IFastest<T> PageSize(int Size);
|
||||||
int BulkCopy(List<T> datas);
|
int BulkCopy(List<T> datas);
|
||||||
Task<int> BulkCopyAsync(List<T> datas);
|
Task<int> BulkCopyAsync(List<T> datas);
|
||||||
|
|
||||||
|
@@ -52,9 +52,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
base.CloseDb();
|
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
base.CloseDb();
|
||||||
|
}
|
||||||
return await Task.FromResult(dt.Rows.Count);
|
return await Task.FromResult(dt.Rows.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user