/// <summary> /// Creates a new instance with a TransactionScopeOptions.Required /// and TransactionOptions.IsolationLevel.ReadCommitted. /// </summary> public TransactionScope() { _txOptions = new TransactionOptions(); _txOptions.IsolationLevel = IsolationLevel.ReadCommitted; _txOptions.TimeOut = new TimeSpan(0,0,0,15); _txScopeOptions = TransactionScopeOptions.Required; EnterTransactionContext(); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="txScopeOptions">The specified TransactionScopeOptions.</param> /// <param name="options">The specified TransactionOptions.</param> public TransactionScope(TransactionScopeOptions txScopeOptions, TransactionOptions options) { _txOptions = options; _txScopeOptions = txScopeOptions; EnterTransactionContext(); }