///<summary> /// Executes any custom code required by the business object before it is persisted to the database. /// This has the additionl capability of creating or updating other business objects and adding these /// to the transaction committer. /// <remarks> Recursive call to UpdateObjectBeforePersisting will not be done i.e. it is the bo developers responsibility to implement</remarks> ///</summary> ///<param name="transactionCommitter">the transaction committer that is executing the transaction</param> protected internal override void UpdateObjectBeforePersisting(ITransactionCommitter transactionCommitter) { base.UpdateObjectBeforePersisting(transactionCommitter); INumberGenerator numGen = new NumberGenerator("GeneratedNumber"); this.GeneratedNumber = numGen.NextNumber().ToString(); numGen.AddToTransaction(transactionCommitter); }