コード例 #1
0
        protected override void EstablishContext()
        {
            _provider = new SqlLiteSessionFactoryProvider(typeof(PersistentSubscriptionMap));
            _sessionFactory = _provider.GetSessionFactory();

            base.EstablishContext();
        }
コード例 #2
0
        protected override void EstablishContext()
        {
            _provider       = new SqlLiteSessionFactoryProvider(typeof(PersistentSubscriptionMap));
            _sessionFactory = _provider.GetSessionFactory();

            base.EstablishContext();
        }
コード例 #3
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            var provider = new SqlLiteSessionFactoryProvider(new Type[]
            {
                typeof(ConcurrentSagaMap), typeof(ConcurrentLegacySagaMap)
            });

            var sessionFactory = provider.GetSessionFactory();

            _openConnection = new SQLiteConnection(provider.Configuration.Properties[NHibernate.Cfg.Environment.ConnectionString]);
            _openConnection.Open();
            sessionFactory.OpenSession(_openConnection);

            SessionFactory = new SingleConnectionSessionFactory(sessionFactory, _openConnection);

            BuildSchema(provider.Configuration, _openConnection);
        }
コード例 #4
0
ファイル: SagaLocator_Specs.cs プロジェクト: gcheney/Burrows
        public void Setup()
        {
            var provider = new SqlLiteSessionFactoryProvider(new[]
            {
                typeof(ConcurrentSagaMap), typeof(ConcurrentLegacySagaMap)
            });

            ISessionFactory sessionFactory = provider.GetSessionFactory();

            _openConnection =
                new SQLiteConnection(provider.Configuration.Properties[NHibernate.Cfg.Environment.ConnectionString]);
            _openConnection.Open();
            sessionFactory.OpenSession(_openConnection);

            _sessionFactory = new SingleConnectionSessionFactory(sessionFactory, _openConnection);

            BuildSchema(provider.Configuration, _openConnection);

            _sagaId = NewId.NextGuid();
        }