mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update blueCopy
This commit is contained in:
@@ -51,7 +51,15 @@ namespace SqlSugar
|
||||
{
|
||||
this.Context.Ado.Connection.Open();
|
||||
}
|
||||
bulkCopy.WriteToServer(dt);
|
||||
try
|
||||
{
|
||||
bulkCopy.WriteToServer(dt);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Context.Ado.Connection.Close();
|
||||
throw ex;
|
||||
}
|
||||
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
|
||||
{
|
||||
this.Context.Ado.Connection.Close();
|
||||
|
Reference in New Issue
Block a user