コード例 #1
0
        public async Task Handle(CustomerCreatedEvent notification, CancellationToken cancellationToken)
        {
            var eventLog = new EventLog
            {
                Message = $"{notification.CustomerId} customer is created.",
                Data    = JsonConvert.SerializeObject(notification.CustomerId)
            };

            await _eventLogRepository.CreateEventLogAsync(eventLog);
        }