Exemplo n.º 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));
 }
Exemplo n.º 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));
        }
Exemplo n.º 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));
 }
Exemplo n.º 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()));
 }
Exemplo n.º 5
0
 public When_using_EntityFrameworkConcurrencyPessimistic()
 {
     _sagaDbContextFactory =
         () => new SagaDbContext <ChoirState, EntityFrameworkChoirStateMapPessmistic>(SagaDbContextFactoryProvider.GetLocalDbConnectionString());
     _repository = new Lazy <ISagaRepository <ChoirState> >(() => new EntityFrameworkSagaRepository <ChoirState>(_sagaDbContextFactory));
 }