Exemplo n.º 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());
        }
Exemplo n.º 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();
		}
Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }