public SQLiteBudgetStore(Guid deviceId, string dbPath) { _connectionString = DBPathToConnectionString(dbPath); _connection = new SqliteConnection(_connectionString); _connection.Open(); EnsureTablesInitialized(); _eventStore = new SQLiteEventStore(_connection); _snapshotStore = new SQLiteSnapshotStore(_connectionString); }
public SQLiteBudgetStore(Guid deviceId, string connectionString, Func <SQLiteEventStore, IEventStore> decorateStoreFunc) { _connectionString = connectionString; _connection = new SqliteConnection(_connectionString); _connection.Open(); EnsureTablesInitialized(); _eventStore = new SQLiteEventStore(_connection); _snapshotStore = new SQLiteSnapshotStore(_connectionString); _decoratedEventStore = decorateStoreFunc(_eventStore); }