private void ApplyMeetingsEvent(MeetingsEvent @event) { _readModel.Integrate(@event); @event.Apply( meetingStarted => ListenToEvents <MeetingEvent>($"Meeting-{meetingStarted.MeetingId}", ApplyMeetingEvent) ); }
private void ApplyMeetingsEvent(MeetingsEvent @event) { @event.Apply( meetingStarted => { _logger.LogInformation($"Adding Meeting {meetingStarted.MeetingId}"); _readModelCollection.Add(meetingStarted.MeetingId, meetingStarted.Name); ListenToEvents <MeetingEvent>($"Meeting-{meetingStarted.MeetingId}", ApplyMeetingEvent); }); }