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

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