예제 #1
0
        public IPersistStreams EventStoreUsingAmbientTransaction()
        {
            // use an existing transaction-scope, if available
            IPersistStreams persistence = new InMemoryRavenPersistenceFactory(TestRavenConfig.ConnectionName, TestRavenConfig.Serializer,
                                                                              new RavenPersistenceOptions(TestRavenConfig.PageSize, TestRavenConfig.ConsistentQueries, TransactionScopeOption.Required)
                                                                              ).Build();

            persistence.Initialize();
            return(persistence);
        }
예제 #2
0
        public IPersistStreams EventStoreUsingAmbientTransaction()
        {
            var config = TestRavenConfig.GetDefaultConfig();

            config.ScopeOption = TransactionScopeOption.Required; // use an existing transaction-scope, if available

            var persistence = new InMemoryRavenPersistenceFactory(config).Build();

            persistence.Initialize();

            return(persistence);
        }