public void AddTransaction(decimal amount, string description) { var @event = new AccountTransactionCreated( Guid.NewGuid(), DateTime.Now, amount, description ); Append(@event); Apply(@event); }
public void Apply(AccountTransactionCreated @event) { Total += @event.Amount; TransactionCount++; }