Beispiel #1
0
        public async Task Save(LoanApplication application)
        {
            foreach (var uncommittedEvent in application.UncommittedEvents)
            {
                uncommittedEvent.AggregateId = application.Id;
                uncommittedEvent.Occurred    = DateTimeOffset.Now;
            }

            await _eventStore.SaveEvents(new LoanApplicationEventStreamId(application.Id), application.GetExpectedVersion(), application.UncommittedEvents);
        }