From 2acb9ca7e5371f3263d7aba6c6e0e704ee44a991 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Mon, 6 Dec 2021 12:00:12 -0500 Subject: [PATCH] Bug fix: Spent hours hunting down why database files weren't closing correctly. New to EF Core 6 "SQLite: Connections are pooled" " This results in database files being kept open by the process even after the ADO.NET connection object is closed." wtf microsoft?! --- AppScaffolding/AppScaffolding.csproj | 2 +- LibationFileManager/SqliteStorage.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AppScaffolding/AppScaffolding.csproj b/AppScaffolding/AppScaffolding.csproj index 7efe8ce8..3041f423 100644 --- a/AppScaffolding/AppScaffolding.csproj +++ b/AppScaffolding/AppScaffolding.csproj @@ -3,7 +3,7 @@ net6.0 - 6.5.6.1 + 6.5.7.1 diff --git a/LibationFileManager/SqliteStorage.cs b/LibationFileManager/SqliteStorage.cs index 3871b79a..fd98bf06 100644 --- a/LibationFileManager/SqliteStorage.cs +++ b/LibationFileManager/SqliteStorage.cs @@ -6,6 +6,6 @@ namespace LibationFileManager { // not customizable. don't move to config private static string databasePath => Path.Combine(Configuration.Instance.LibationFiles, "LibationContext.db"); - public static string ConnectionString => $"Data Source={databasePath};Foreign Keys=False;"; + public static string ConnectionString => $"Data Source={databasePath};Foreign Keys=False;Pooling=False;"; } }