コード例 #1
0
        static ISessionFactory CreateSessionFactory()
        {
            var provider = new NHibernateSessionFactoryProvider(new[]
                {
                    typeof(HealthSagaMap),
                });

            return provider.GetSessionFactory();
        }
コード例 #2
0
        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());
        }
コード例 #4
0
		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);
        }
コード例 #7
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();
        }
コード例 #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();
        }