Code optimization

This commit is contained in:
skx
2021-02-03 17:48:44 +08:00
parent 8f421f8762
commit 0c61f19b30

View File

@@ -33,7 +33,7 @@ namespace SqlSugar
}
catch (Exception ex)
{
this.Context.Ado.Connection.Close();
CloseDb();
throw ex;
}
CloseDb();
@@ -57,13 +57,10 @@ namespace SqlSugar
}
catch (Exception ex)
{
this.Context.Ado.Connection.Close();
CloseDb();
throw ex;
}
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
{
this.Context.Ado.Connection.Close();
}
CloseDb();
return DbColumnInfoList.Count;
}