Пример #1
0
        static ISessionFactory CreateSessionFactory()
        {
            var provider = new NHibernateSessionFactoryProvider(new[]
                {
                    typeof(HealthSagaMap),
                });

            return provider.GetSessionFactory();
        }
        static ISessionFactory CreateSessionFactory()
        {
            var provider = new NHibernateSessionFactoryProvider(new[]
            {
                typeof(TimeoutSagaMap),
            });

            return(provider.GetSessionFactory());
        }
Пример #3
0
        static ISessionFactory CreateSessionFactory()
        {
            var provider = new NHibernateSessionFactoryProvider(new Type[]
            {
                typeof(SubscriptionSagaMap),
                typeof(SubscriptionClientSagaMap),
            });

            return(provider.GetSessionFactory());
        }
		static ISessionFactory CreateSessionFactory()
		{
		    var provider = new NHibernateSessionFactoryProvider(new Type[]
		        {
		            typeof(SubscriptionSagaMap),
                    typeof(SubscriptionClientSagaMap),
		        });

		    return provider.GetSessionFactory();
		}
Пример #5
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            var provider = new NHibernateSessionFactoryProvider(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);
        }
Пример #6
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            var provider = new NHibernateSessionFactoryProvider(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);
        }
        protected override void EstablishContext()
        {
            var provider = new NHibernateSessionFactoryProvider(new[]
                {
                    typeof(ConcurrentSagaMap), typeof(ConcurrentLegacySagaMap)
                }, x =>
                    {
                        x.Dialect<MsSql2008Dialect>();
                        x.BatchSize = 100;
                        x.ConnectionString = "Server=(local);initial catalog=test;Trusted_Connection=yes";
                        x.LogSqlInConsole = true;
                        x.LogFormattedSql = true;
                        x.IsolationLevel = IsolationLevel.RepeatableRead;
//                        .DefaultSchema("dbo")
                    });

            SessionFactory = provider.GetSessionFactory();

            base.EstablishContext();
        }
Пример #8
0
        protected override void EstablishContext()
        {
            var provider = new NHibernateSessionFactoryProvider(new[]
            {
                typeof(ConcurrentSagaMap), typeof(ConcurrentLegacySagaMap)
            }, x =>
            {
                x.Dialect <MsSql2008Dialect>();
                x.BatchSize        = 100;
                x.ConnectionString = "Server=(local);initial catalog=test;Trusted_Connection=yes";
                x.LogSqlInConsole  = true;
                x.LogFormattedSql  = true;
                x.IsolationLevel   = IsolationLevel.RepeatableRead;
//                        .DefaultSchema("dbo")
            });

            SessionFactory = provider.GetSessionFactory();

            base.EstablishContext();
        }
Пример #9
0
        public void Setup()
        {
            var provider = new NHibernateSessionFactoryProvider(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();
        }
Пример #10
0
        public void Setup()
        {
            var provider = new NHibernateSessionFactoryProvider(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();
        }