Remove Code

This commit is contained in:
sunkaixuan 2025-02-17 17:57:30 +08:00
parent afdece575c
commit 6d140e3c91

View File

@ -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)