public IList <Study> LoadRelatedStudies() { using (var context = new ServerExecutionContext()) { IStudyEntityBroker broker = context.ReadContext.GetBroker <IStudyEntityBroker>(); StudySelectCriteria criteria = new StudySelectCriteria(); criteria.PatientKey.EqualTo(Key); return(broker.Find(criteria)); } }
public IList <Study> LoadRelatedStudies() { using (IReadContext read = PersistentStoreRegistry.GetDefaultStore().OpenReadContext()) { IStudyEntityBroker broker = read.GetBroker <IStudyEntityBroker>(); StudySelectCriteria criteria = new StudySelectCriteria(); criteria.PatientKey.EqualTo(Key); return(broker.Find(criteria)); } }