protected override void EstablishContext()
        {
            _provider = new SqlLiteSessionFactoryProvider(typeof(PersistentSubscriptionMap));
            _sessionFactory = _provider.GetSessionFactory();

            base.EstablishContext();
        }
        protected override void EstablishContext()
        {
            _provider       = new SqlLiteSessionFactoryProvider(typeof(PersistentSubscriptionMap));
            _sessionFactory = _provider.GetSessionFactory();

            base.EstablishContext();
        }
Exemple #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);
        }
Exemple #4
0
        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();
        }