///<summary>
 /// This method adds an <see cref="ITransactional"/> to the list of transactions.
 ///</summary>
 ///<param name="transaction">The transaction to add to the <see cref="ITransactionCommitter"/>.</param>
 public void AddTransaction(ITransactional transaction)
 {
     if (_myDataAccessor == null)
     {
         _myDataAccessor       = _defaultDataAccessor;
         _transactionCommitter = _myDataAccessor.CreateTransactionCommitter();
     }
     _transactionCommitter.AddTransaction(transaction);
 }
 /// <summary>
 /// Steps to carry out before the Save() command is run. You can add objects to the current
 /// transaction using this method, such as a database number generator.  No validity checks are
 /// made to the BusinessObject after this step, so be careful not to invalidate the object.
 /// </summary>
 /// <param name="transactionCommitter">The current transaction committer - any objects added to this will
 /// be committed in the same transaction as this one.</param>
 protected internal override void UpdateObjectBeforePersisting(ITransactionCommitter transactionCommitter)
 {
     transactionCommitter.AddTransaction(new StubSuccessfullTransaction());
 }
 /// <summary>
 /// Steps to carry out before the Save() command is run. You can add objects to the current
 /// transaction using this method, such as a database number generator.  No validity checks are 
 /// made to the BusinessObject after this step, so be careful not to invalidate the object.
 /// </summary>
 /// <param name="transactionCommitter">The current transaction committer - any objects added to this will
 /// be committed in the same transaction as this one.</param>
 protected internal override void UpdateObjectBeforePersisting(ITransactionCommitter transactionCommitter)
 {
     transactionCommitter.AddTransaction(new StubSuccessfullTransaction());
 }