public async Task Handle(VacancyTransferredEvent notification, CancellationToken cancellationToken) { if (notification == null) { throw new ArgumentNullException(nameof(notification), "Should not be null"); } var vacancy = await _vacancyRepository.GetVacancyAsync(notification.VacancyReference); _logger.LogInformation("Handling {eventType} for accountId: {employerAccountId} and vacancyReference: {vacancyReference}", notification.GetType().Name, vacancy.EmployerAccountId, notification.VacancyReference); await _dashboardService.ReBuildDashboardAsync(vacancy.EmployerAccountId); }
public async Task Handle(VacancyTransferredEvent notification, CancellationToken cancellationToken) { if (notification == null) { throw new ArgumentNullException(nameof(notification), "Should not be null"); } var vacancy = await _vacancyRepository.GetVacancyAsync(notification.VacancyReference); _logger.LogInformation("Handling {eventType} for ukprn: {ukprn} and vacancyReference: {vacancyReference}", notification.GetType().Name, vacancy.TrainingProvider.Ukprn.Value, notification.VacancyReference); await _dashboardService.ReBuildDashboardAsync(vacancy.TrainingProvider.Ukprn.GetValueOrDefault()); }