public Database(ISQLitePlatform platform, string databasePath) { _connectionParameters = new SQLiteConnectionString(databasePath, false); _sqliteConnectionPool = new SQLiteConnectionPool(platform); _dbConnection = new SQLiteAsyncConnection(() => _sqliteConnectionPool.GetConnection(_connectionParameters)); }
public SqliteEventStore(ISQLitePlatform sqLitePlatform, string databasePath, GetUtcNow getUtcNow = null) { Ensure.That(sqLitePlatform, "sqLitePlatform").IsNotNull(); Ensure.That(databasePath, "databasePath").IsNotNull(); _getUtcNow = getUtcNow ?? SystemClock.GetUtcNow; _connectionPool = new SQLiteConnectionPool(sqLitePlatform); var connectionString = new SQLiteConnectionString(databasePath, false); _getConnection = () => _connectionPool.GetConnection(connectionString); }