static ISagaRepository <ReadOnlyInstance> CreateSagaRepository() { var provider = new SQLiteSessionFactoryProvider(false, typeof(ReadOnlyInstanceMap)); var sessionFactory = provider.GetSessionFactory(); ISagaRepository <ReadOnlyInstance> sagaRepository = NHibernateSagaRepository <ReadOnlyInstance> .Create(sessionFactory); return(sagaRepository); }
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _machine = new TestStateMachine(); _sessionFactory = new SQLiteSessionFactoryProvider(typeof(InstanceMap)) .GetSessionFactory(); _repository = NHibernateSagaRepository <Instance> .Create(_sessionFactory); configurator.StateMachineSaga(_machine, _repository); }
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _provider = new SQLiteSessionFactoryProvider(false, typeof(MissingInstanceMap)); _sessionFactory = _provider.GetSessionFactory(); _sagaRepository = new Lazy <ISagaRepository <MissingInstance> >(() => NHibernateSagaRepository <MissingInstance> .Create(_sessionFactory)); _machine = new TestStateMachine(); configurator.StateMachineSaga(_machine, _sagaRepository.Value); }
public Locating_an_existing_saga() { _provider = new SQLiteSessionFactoryProvider(false, typeof(SimpleSagaMap)); _sessionFactory = _provider.GetSessionFactory(); _sagaRepository = new Lazy <ISagaRepository <SimpleSaga> >(() => NHibernateSagaRepository <SimpleSaga> .Create(_sessionFactory)); }