public NHibernateSagaRepository(ISessionFactory sessionFactory)
        {
            var consumeContextFactory = new NHibernateSagaConsumeContextFactory <TSaga>();

            var repositoryContextFactory = new NHibernateSagaRepositoryContextFactory <TSaga>(sessionFactory, consumeContextFactory);

            _repository = new SagaRepository <TSaga>(repositoryContextFactory);
        }
Exemplo n.º 2
0
        public static ISagaRepository <TSaga> Create(ISessionFactory sessionFactory)
        {
            var consumeContextFactory = new SagaConsumeContextFactory <ISession, TSaga>();

            var repositoryContextFactory = new NHibernateSagaRepositoryContextFactory <TSaga>(sessionFactory, consumeContextFactory);

            return(new SagaRepository <TSaga>(repositoryContextFactory));
        }