Synchronization code

This commit is contained in:
sunkaixuan 2023-09-22 20:24:25 +08:00
parent c04b7ab1de
commit e5106b2f6f

View File

@ -26,7 +26,7 @@ namespace SqlSugar
public void CloseDb()
{
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection)
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
{
this.Context.Close();
}