Пример #1
0
 public DuplicateCheckResponse DuplicateCompanyNumberInAnotherOrganisation(string companyNumber, Guid organisationId)
 {
     return(string.IsNullOrEmpty(companyNumber)
         ? new DuplicateCheckResponse {
         DuplicateFound = false, DuplicateOrganisationName = ""
     }
         : _duplicateCheckRepository.DuplicateCompanyNumberExists(organisationId, companyNumber).Result);
 }
 public async Task <DuplicateCheckResponse> Handle(DuplicateCompanyNumberCheckRequest request, CancellationToken cancellationToken)
 {
     try
     {
         return(await _repository.DuplicateCompanyNumberExists(request.OrganisationId, request.CompanyNumber));
     }
     catch (Exception ex)
     {
         _logger.LogError("Unable to perform company number duplicate check", ex);
         throw new ApplicationException(ex.Message);
     }
 }