/// <summary> /// Starts a <see cref="DALCTransaction"/> if this instance of the BusinessFacade was constructed to participate in /// transactions. It also sets the transaction's private variables appropriately and pushes the created Guid for the /// BusinessFacade method calling Start() to the transaction's stack of users. /// </summary> protected void Start() { // Only start a transaction if the business facade was constructed to partipate in transactions if (_partipatesInTransaction) { //Start a transaction if one does not exist, otherwise it uses the existing transaction if (!_isInTransaction) { //Create the DALCTransaction and set it to the private variable _transaction = new DALCTransaction(Guid.NewGuid()); _isInTransaction = true; //Add the transaction to the TransactionManager if one exists if (_hasTransactionManager) { _transactionManager.AddTransaction(_transaction); } } else { //Push a new GUID to the transaction users stack _transaction.PushTransactionUser(Guid.NewGuid()); } } }
/// <summary> /// Constructor with a <see cref="DALCTransaction"/> to initialize the BusinessFacade's private variables. /// Called if this instance of the business facade is to be created within the scope of an existing <see cref="DALCTransaction"/>. /// </summary> /// <param name="transaction"><see cref="DALCTransaction"/> that has been previously created for a specific business workflow</param> public BusinessFacade(DALCTransaction transaction) { // Check input DALCTransaction if (transaction == null) { throw new MNFatalException( "Transaction parameter must not be null to perform data access logic using a transaction."); } // Assign the transaction object _transaction = transaction; // Initialize variables _partipatesInTransaction = true; _isInTransaction = true; _isTransactionAborted = false; _hasTransactionManager = false; }
public IssueDocumentDalc(DALCTransaction transaction) : base(transaction) { }
/// <summary> /// Constructor with a transaction. /// </summary> /// <param name="transaction"></param> public SubscriptionDalc(DALCTransaction transaction) : base(transaction) { }
public ArticleDocumentDalc(DALCTransaction transaction) : base(transaction) { }
public VolumeDALC(DALCTransaction transaction) : base(transaction) { }
/// <summary> /// Constructor with a transaction. /// </summary> /// <param name="transaction"></param> public RoleDalc(DALCTransaction transaction) : base(transaction) { }
public UserIPAddressDalc(DALCTransaction transaction) : base(transaction) { }
/// <summary> /// Constructor with a transaction. /// </summary> /// <param name="transaction"></param> public UserDalc(DALCTransaction transaction) : base(transaction) { }