public static EntityFrameworkSagaRepository <TSaga> CreatePessimistic(ISagaDbContextFactory sagaDbContextFactory,
                                                                       IRawSqlLockStatements rawSqlLockStatements = null,
                                                                       Func <IQueryable <TSaga>, IQueryable <TSaga> > queryCustomization = null)
 {
     return(new EntityFrameworkSagaRepository <TSaga>(sagaDbContextFactory, IsolationLevel.Serializable, queryCustomization,
                                                      rawSqlLockStatements ?? new MsSqlLockStatements()));
 }
 public static EntityFrameworkSagaRepository <TSaga> CreatePessimistic(
     Func <DbContext> sagaDbContextFactory,
     IRawSqlLockStatements rawSqlLockStatements = null,
     Func <IQueryable <TSaga>, IQueryable <TSaga> > queryCustomization = null
     )
 {
     return(CreatePessimistic(new DelegateSagaDbContextFactory <TSaga>(sagaDbContextFactory), rawSqlLockStatements, queryCustomization));
 }
 public EntityFrameworkSagaRepository(ISagaDbContextFactory sagaDbContextFactory,
                                      IsolationLevel isolationLevel = IsolationLevel.ReadCommitted,
                                      IRawSqlLockStatements rawSqlLockStatements = null)
 {
     _sagaDbContextFactory = sagaDbContextFactory;
     _isolationLevel       = isolationLevel;
     _rawSqlLockStatements = rawSqlLockStatements;
 }
 public EntityFrameworkSagaRepository(ISagaDbContextFactory sagaDbContextFactory,
                                      IsolationLevel isolationLevel = IsolationLevel.ReadCommitted,
                                      Func <IQueryable <TSaga>, IQueryable <TSaga> > queryCustomization = null,
                                      IRawSqlLockStatements rawSqlLockStatements = null)
 {
     _sagaDbContextFactory = sagaDbContextFactory;
     _isolationLevel       = isolationLevel;
     _queryCustomization   = queryCustomization;
     _rawSqlLockStatements = rawSqlLockStatements;
 }
 public static EntityFrameworkSagaRepository <TSaga> CreatePessimistic(Func <DbContext> sagaDbContextFactory,
                                                                       IRawSqlLockStatements rawSqlLockStatements = null)
 {
     return(CreatePessimistic(new DelegateSagaDbContextFactory(sagaDbContextFactory), rawSqlLockStatements));
 }