public async Task Handle(UniCreationFailedDomainEvent @event, CancellationToken cancellationToken) { var uniCreationFailedIntegrationEvent = new UniCreationFailedIntegrationEvent(@event.AttachmentId); await _sigmaIntegrationEventService.AddAndSaveEventAsync(uniCreationFailedIntegrationEvent); _logger.CreateLogger(nameof(UniCreationFailedDomainEventHandler)) .LogTrace($"Failed to create a UNI for attachment with ID {@event.AttachmentId}."); }
public async Task Handle(UniCreatedDomainEvent @event, CancellationToken cancellationToken) { var uniDTO = _mapper.Map <UniDTO>(@event.Uni); var uniCreatedIntegrationEvent = new UniCreatedIntegrationEvent(@event.AttachmentId, uniDTO); await _sigmaIntegrationEventService.AddAndSaveEventAsync(uniCreatedIntegrationEvent); _logger.CreateLogger(nameof(UniCreatedDomainEventHandler)) .LogTrace($"Attachment with ID {@event.AttachmentId} has been assigned UNI {@event.Uni.Name}."); }