コード例 #1
0
ファイル: PatientRepository.cs プロジェクト: lrasmus/MHGR
 public patient_result_collections AddCollection(patient patient, result_files file)
 {
     // Add the patient result collection for this entry
     var collection = new patient_result_collections()
     {
         patient_id = patient.id,
         received_on = DateTime.Now,
         result_file_id = file.id
     };
     entities.patient_result_collections.Add(collection);
     entities.SaveChanges();
     return collection;
 }
コード例 #2
0
ファイル: VariantRepository.cs プロジェクト: lrasmus/MHGR
        public void AddPatientVariantsToCollection(patient_result_collections collection, List<patient_variants> patientVariants)
        {
            foreach (var variant in patientVariants)
            {
                var member = new patient_result_members()
                {
                    collection_id = collection.id,
                    member_id = variant.id,
                    member_type = Enums.ResultMemberType.Variant,
                };
                entities.patient_result_members.Add(member);
            }

            entities.SaveChanges();
        }