public async Task <T> Get <T>(Guid qr) { var profile = await patientBussiness.Get(qr); if (profile != null) { return(profile.ConvertTo <T>()); } var profile2 = await registeredPatientBussiness.Get(qr); if (profile2 != null) { return(profile2.ConvertTo <T>()); } throw new NotFoundException("No patient found"); }