/// <summary> /// Initializes a new instance of the <see cref="EfUnitOfWork"/> class. /// </summary> /// <param name="ambientContextManager">The transaction manager.</param> /// <param name="dbContextContainer">The context container.</param> /// <param name="parent">The parent.</param> /// <remarks></remarks> protected internal EfUnitOfWork(AmbientContextManagerBase ambientContextManager, IDbContextContainer dbContextContainer, UnitOfWorkBase parent) : base(ambientContextManager, parent) { if (dbContextContainer == null) { throw new ArgumentNullException("dbContextContainer"); } _DbContextContianer = dbContextContainer; }
protected UnitOfWorkBase(AmbientContextManagerBase ambientContextManager, UnitOfWorkBase parent, TransactionOptions transactionOptions) { ValidateTransactionOptions(parent, transactionOptions); _Id = Guid.NewGuid(); _AmbientContextManager = ambientContextManager; _Parent = parent; _TransactionOptions = transactionOptions; _ScopeThread = Thread.CurrentThread; _Status = TransactionStatus.InDoubt; _ScopeTransactionFactory = new Lazy <Transaction>( _Parent == null ? (Func <Transaction>)(() => new CommittableTransaction(TransactionOptions)) : (Func <Transaction>)(() => _Parent.ScopeTransaction)); }
/// <summary> /// Initializes a new instance of the <see cref="EfUnitOfWork"/> class. /// </summary> /// <param name="ambientContextManager">The transaction manager.</param> /// <param name="dbContextContainer">The context container.</param> /// <remarks></remarks> protected internal EfUnitOfWork(AmbientContextManagerBase ambientContextManager, IDbContextContainer dbContextContainer) : this(ambientContextManager, dbContextContainer, null) { }
protected UnitOfWorkBase(AmbientContextManagerBase ambientContextManager, TransactionOptions transactionOptions) : this(ambientContextManager, null, transactionOptions) { }
protected UnitOfWorkBase(AmbientContextManagerBase ambientContextManager, UnitOfWorkBase parent) : this(ambientContextManager, parent, new TransactionOptions()) { }
public NonAtomicUnitOfWork(AmbientContextManagerBase ambientContextManager) : base(ambientContextManager) { }
protected UnitOfWorkBase(AmbientContextManagerBase ambientContextManager) : this(ambientContextManager, null, new TransactionOptions()) { }
public NonAtomicUnitOfWork(AmbientContextManagerBase ambientContextManager) : base(ambientContextManager) { }
protected internal CompositeUnitOfWork(AmbientContextManagerBase ambientContextManager, UnitOfWorkBase parent, PersistenceOptions persistenceOptions) : base(ambientContextManager, parent, persistenceOptions.TransactionOptions) { _PersistenceOptions = persistenceOptions; }
/// <summary> /// Initializes a new instance of the <see cref="CompositeUnitOfWork" /> class. /// </summary> /// <param name="ambientContextManager">The ambient context manager.</param> /// <param name="parent">The parent.</param> public CompositeUnitOfWork(AmbientContextManagerBase ambientContextManager, UnitOfWorkBase parent) : this(ambientContextManager, parent, new PersistenceOptions()) { }
/// <summary> /// Initializes a new instance of the <see cref="CompositeUnitOfWork" /> class. /// </summary> /// <param name="ambientContextManager">The ambient context manager.</param> /// <param name="persistenceOptions">The persistence options.</param> public CompositeUnitOfWork(AmbientContextManagerBase ambientContextManager, PersistenceOptions persistenceOptions) : this(ambientContextManager, null, persistenceOptions) { }
/// <summary> /// Initializes a new instance of the <see cref="CompositeUnitOfWork" /> class. /// </summary> /// <param name="ambientContextManager">The ambient context manager.</param> public CompositeUnitOfWork(AmbientContextManagerBase ambientContextManager) : this(ambientContextManager, null, new PersistenceOptions()) { }