mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Code optimization
This commit is contained in:
@@ -33,7 +33,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.Context.Ado.Connection.Close();
|
CloseDb();
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
CloseDb();
|
CloseDb();
|
||||||
@@ -57,13 +57,10 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.Context.Ado.Connection.Close();
|
CloseDb();
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
|
CloseDb();
|
||||||
{
|
|
||||||
this.Context.Ado.Connection.Close();
|
|
||||||
}
|
|
||||||
return DbColumnInfoList.Count;
|
return DbColumnInfoList.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user