public async Task <DuplicateCheckResponse> Handle(DuplicateUKPRNCheckRequest request, CancellationToken cancellationToken)
 {
     try
     {
         return(await _repository.DuplicateUKPRNExists(request.OrganisationId, request.UKPRN));
     }
     catch (Exception ex)
     {
         _logger.LogError("Unable to perform UKPRN duplicate check", ex);
         throw new ApplicationException(ex.Message);
     }
 }
Example #2
0
        public string DuplicateUkprnInAnotherOrganisation(long ukprn, Guid organisationId)
        {
            var response = _duplicateCheckRepository.DuplicateUKPRNExists(organisationId, ukprn).Result;

            return(response.DuplicateOrganisationName);
        }