Exemplo n.º 1
0
        public ISagaStorage GetSagaStorage()
        {
            var OracleSagaStorage = new OracleSqlSagaStorage(OracleTestHelper.ConnectionHelper, "saga_data", "saga_index", new ConsoleLoggerFactory(false));

            OracleSagaStorage.EnsureTablesAreCreated();
            return(OracleSagaStorage);
        }
Exemplo n.º 2
0
        /// <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);
            });
        }