public When_pre_inserting_in_an_invalid_state_with_ef() { SagaDbContextFactory sagaDbContextFactory = () => new SagaDbContext <Instance, EntityFrameworkInstanceMap>(SagaDbContextFactoryProvider.GetLocalDbConnectionString()); _repository = new EntityFrameworkSagaRepository <Instance>(sagaDbContextFactory); }
public When_pre_inserting_the_state_machine_instance_using_ef() { ISagaDbContextFactory <Instance> sagaDbContextFactory = new DelegateSagaDbContextFactory <Instance>( () => new InstanceSagaDbContext(SagaDbContextFactoryProvider.GetLocalDbConnectionString())); _repository = EntityFrameworkSagaRepository <Instance> .CreatePessimistic(sagaDbContextFactory); }
public When_pre_inserting_in_an_invalid_state_using_ef() { ISagaDbContextFactory <Instance> sagaDbContextFactory = new DelegateSagaDbContextFactory <Instance>( () => new SagaDbContext <Instance, EntityFrameworkInstanceMap>(SagaDbContextFactoryProvider.GetLocalDbConnectionString())); _repository = EntityFrameworkSagaRepository <Instance> .CreatePessimistic(sagaDbContextFactory); }
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _discarded = GetTask <bool>(); _simpleStateMachine = new SimpleStateMachine(x => { _discarded.TrySetResult(true); }); _sagaDbContextFactory = () => new SagaDbContext <SimpleState, SimpleStateMap>(SagaDbContextFactoryProvider.GetLocalDbConnectionString()); _simpleStateRepository = new Lazy <ISagaRepository <SimpleState> >(() => new EntityFrameworkSagaRepository <SimpleState>(_sagaDbContextFactory)); configurator.StateMachineSaga(_simpleStateMachine, _simpleStateRepository.Value); base.ConfigureInMemoryReceiveEndpoint(configurator); }