public ISagaStorage GetSagaStorage() { var OracleSagaStorage = new OracleSqlSagaStorage(OracleTestHelper.ConnectionHelper, "saga_data", "saga_index", new ConsoleLoggerFactory(false)); OracleSagaStorage.EnsureTablesAreCreated(); return(OracleSagaStorage); }
/// <summary> /// Configures Rebus to use Oracle to store sagas, using the tables specified to store data and indexed properties respectively. /// </summary> public static void StoreInOracle(this StandardConfigurer <ISagaStorage> configurer, string connectionString, string dataTableName, string indexTableName, bool automaticallyCreateTables = true, Action <OracleConnection> additionalConnectionSetup = null, bool enlistInAmbientTransaction = false) { configurer.Register(c => { var rebusLoggerFactory = c.Get <IRebusLoggerFactory>(); var sagaStorage = new OracleSqlSagaStorage(new OracleConnectionHelper(connectionString, additionalConnectionSetup, enlistInAmbientTransaction), dataTableName, indexTableName, rebusLoggerFactory); if (automaticallyCreateTables) { sagaStorage.EnsureTablesAreCreated(); } return(sagaStorage); }); }