private static void VersionCheck() { if (Settings.DatabaseVersion == DATABASE_VERSION.ToString()) { return; } LiteDatabase.Dispose(); LiteDatabase = null; DbFileStream.Dispose(); DbFileStream = null; SettingsCollection = null; File.Delete(DatabaseFileLocation); InitializeDatabase(); Settings.DatabaseVersion = DATABASE_VERSION.ToString(); }
public static void Dispose() { DbFileStream?.Dispose(); LiteDatabase?.Dispose(); }