mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Remove Code
This commit is contained in:
parent
afdece575c
commit
6d140e3c91
@ -135,28 +135,7 @@ namespace SqlSugar
|
||||
this.Context.CurrentConnectionConfig.IsAutoCloseConnection = false;
|
||||
this.Open();
|
||||
return result;
|
||||
}
|
||||
public async Task CloseAsync()
|
||||
{
|
||||
if (this.Transaction != null)
|
||||
{
|
||||
this.Transaction = null;
|
||||
}
|
||||
if (this.Connection != null && this.Connection.State == ConnectionState.Open)
|
||||
{
|
||||
await ((DbConnection)this.Connection).CloseAsync();
|
||||
}
|
||||
if (this.IsMasterSlaveSeparation && this.SlaveConnections.HasValue())
|
||||
{
|
||||
foreach (var slaveConnection in this.SlaveConnections)
|
||||
{
|
||||
if (slaveConnection != null && slaveConnection.State == ConnectionState.Open)
|
||||
{
|
||||
await ((DbConnection)slaveConnection).CloseAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public virtual void Close()
|
||||
{
|
||||
if (this.Transaction != null)
|
||||
|
Loading…
Reference in New Issue
Block a user