Beispiel #1
0
 public When_using_EntityFrameworkConcurrencyFail()
 {
     _sagaDbContextFactory = new DelegateSagaDbContextFactory <ChoirState>(
         () => new SagaDbContext <ChoirState, EntityFrameworkChoirStateMap>(SagaDbContextFactoryProvider.GetLocalDbConnectionString()));
     _repository = new Lazy <ISagaRepository <ChoirState> >(() => new EntityFrameworkSagaRepository <ChoirState>(_sagaDbContextFactory, optimistic: true));
 }
Beispiel #2
0
        public When_using_EntityFramework()
        {
            _sagaDbContextFactory = new DelegateSagaDbContextFactory <ShoppingChore>(
                () => new SagaDbContext <ShoppingChore, EntityFrameworkShoppingChoreMap>(SagaDbContextFactoryProvider.GetLocalDbConnectionString()));

            _repository = new Lazy <ISagaRepository <ShoppingChore> >(() => new EntityFrameworkSagaRepository <ShoppingChore>(_sagaDbContextFactory));
        }
Beispiel #3
0
 public When_using_EntityFrameworkConcurrencyOptimistic()
 {
     _sagaDbContextFactory = new DelegateSagaDbContextFactory <ChoirStateOptimistic>(
         () => new SagaDbContext <ChoirStateOptimistic, EntityFrameworkChoirStateMap>(SagaDbContextFactoryProvider.GetLocalDbConnectionString()));
     _repository = new Lazy <ISagaRepository <ChoirStateOptimistic> >(() => EntityFrameworkSagaRepository <ChoirStateOptimistic> .CreateOptimistic(_sagaDbContextFactory));
 }
Beispiel #4
0
 public When_using_EntityFrameworkConcurrencyPessimistic()
 {
     _sagaDbContextFactory = new DelegateSagaDbContextFactory <ChoirStatePessimistic>(
         () => new SagaDbContext <ChoirStatePessimistic, EntityFrameworkChoirStateMapPessmistic>(SagaDbContextFactoryProvider.GetLocalDbConnectionString()));
     _repository = new Lazy <ISagaRepository <ChoirStatePessimistic> >(() => new EntityFrameworkSagaRepository <ChoirStatePessimistic>(_sagaDbContextFactory, System.Data.IsolationLevel.Serializable, new MsSqlLockStatements()));
 }
Beispiel #5
0
 public When_using_EntityFrameworkConcurrencyPessimistic()
 {
     _sagaDbContextFactory =
         () => new SagaDbContext <ChoirState, EntityFrameworkChoirStateMapPessmistic>(SagaDbContextFactoryProvider.GetLocalDbConnectionString());
     _repository = new Lazy <ISagaRepository <ChoirState> >(() => new EntityFrameworkSagaRepository <ChoirState>(_sagaDbContextFactory));
 }