private void OnTranscationCommit(object sender, EventArgs e) { DbObjectOperator @operator = sender as DbObjectOperator; @operator.TranscationCommit -= new EventHandler(this.OnTranscationCommit); this.previousState = null; }
public virtual void OnWrote(object sender, DbEventArgs e) { this.State.ObjectWrote = true; this.State.ModifiedValues.Clear(); this.State.UpdateInitialValues(this); this.previousState = DbObjectTools.Clone <DbObjectState>(this.State); e.Operator.TranscationRollback -= new EventHandler(this.OnTranscationRollback); e.Operator.TranscationRollback += new EventHandler(this.OnTranscationRollback); e.Operator.TranscationCommit -= new EventHandler(this.OnTranscationCommit); e.Operator.TranscationCommit += new EventHandler(this.OnTranscationCommit); }