public void RecordInflow(Guid fromId, decimal ammount)
        {
            var @event = new NewInflowRecorded(fromId, Id, new Inflow(ammount, DateTime.Now));

            Apply(@event);
            Append(@event);
        }
        public void Project(NewInflowRecorded @event, IDocumentOperations operations)
        {
            var issue = operations.Load <AllAccountsSummaryView>(Guid.Empty) ?? new AllAccountsSummaryView();

            issue.Apply(@event);
            operations.Store(issue);
        }
 public void Apply(NewInflowRecorded @event)
 {
     Balance += @event.Inflow.Ammount;
 }
 private void Persist(AccountSummaryView view, NewInflowRecorded @event)
 {
     view.ApplyEvent(@event);
 }
Beispiel #5
0
 public void Apply(NewInflowRecorded @event)
 {
     TotalBalance += @event.Inflow.Amount;
     TotalTransactionsCount++;
 }