public async Task AddUniquePotentialDuplicateAlertAsync(DataQualityPotentialDuplicateAlert alert) { if (alert.NotificationId.HasValue) { var matchingAlert = await _alertRepository.GetDuplicateAlertByNotificationIdAndDuplicateId(alert.NotificationId.Value, alert.DuplicateId); if (matchingAlert != null) { return; } } await PopulateAndAddAlertAsync(alert); }