v3.2.807-preview20231219 #1694 #1693

This commit is contained in:
2881099
2023-12-19 16:19:55 +08:00
parent 03d3fe6b3d
commit 2904ada4e7
35 changed files with 47 additions and 131 deletions

View File

@ -149,7 +149,12 @@ namespace FreeSql.Sqlite
public void OnDestroy(DbConnection obj)
{
if (obj.State != ConnectionState.Closed) obj.Close();
#if MicrosoftData
if (obj is SqliteConnection sqlconn && sqlconn != null) SqliteConnection.ClearPool(sqlconn);
#else
if (obj is SQLiteConnection sqlconn && sqlconn != null) SQLiteConnection.ClearPool(sqlconn);
#endif
if (obj.State != ConnectionState.Closed) obj.Close();
obj.Dispose();
}