Beispiel #1
0
        public void AddTransaction(decimal amount, string description)
        {
            var @event = new AccountTransactionCreated(
                Guid.NewGuid(),
                DateTime.Now,
                amount,
                description
                );

            Append(@event);
            Apply(@event);
        }
Beispiel #2
0
 public void Apply(AccountTransactionCreated @event)
 {
     Total += @event.Amount;
     TransactionCount++;
 }