public void CheckProvider(Transfer_Provider provider) { if (!(_facilityRepo.FacilityExistAsync(provider.FacilityId).Result)) { throw new HealthPairAppException("This Facility Does not Exist"); } if (!(_specialtyRepo.SpecialtyExistAsync(provider.SpecialtyId).Result)) { throw new HealthPairAppException("The Specialty does not exist, please choose the correct specialty"); } }