Business Model Objects
Delay Loading Property Values
var patientRepository = ApplicationServiceContext.Current.GetService<IRepositoryService<Patient>>();
var patient = patientRepository.Find(p=>p.Identifiers.Any(id=>id.Value == "TEST")).FirstOrDefault();
// Simple properties are loaded
Console.WriteLine("Gender: {0}", patient.GenderConceptKey);
// Output: Gender: UUID HERE
// Related Properties cannot be accessed
// Throws null reference exception
Console.WriteLine("Gender Mnemonic: {0}", patient.GenderConcept.Mnemonic);Last updated
Was this helpful?