private async Task EnsureProducerRegistrationNumberExists(string producerRegistrationNumber) { bool producerRegistrationExists = await dataAccess.ProducerRegistrationExists(producerRegistrationNumber); if (!producerRegistrationExists) { bool migratedProducerExists = await dataAccess.MigratedProducerExists(producerRegistrationNumber); if (!migratedProducerExists) { string errorMessage = string.Format( "PRN: {0} does not exists in current data set.", producerRegistrationNumber); throw new InvalidOperationException(errorMessage); } } }