public DbEntriesProvider(Database database, ICryptoService cryptoService) { this._databasePath = database.FileName; this._cryptoService = cryptoService; }
public static SQLiteConnection CreateSQLiteConnection(Database database, bool readOnly = true) { return CreateSQLiteConnection(database.FileName, readOnly); }
private void BackupDatabase(Database srcDatabase, string dstFileName) { var destination = Database.GetOrCreate(dstFileName); using (SQLiteConnection srcConnection = ConnectionFactory.CreateSQLiteConnection(srcDatabase)) { srcConnection.Open(); using (SQLiteConnection dstConnection = ConnectionFactory.CreateSQLiteConnection(destination, false)) { dstConnection.Open(); srcConnection.BackupDatabase( dstConnection, "main", "main", -1, null, -1 ); } } GC.Collect(); }