private void FixupMedicalRequestEntity(MedicalRequest previousValue) { if (previousValue != null && previousValue.CheckupForms.Contains(this)) { previousValue.CheckupForms.Remove(this); } if (MedicalRequestEntity != null) { if (!MedicalRequestEntity.CheckupForms.Contains(this)) { MedicalRequestEntity.CheckupForms.Add(this); } if (MedicalRequestId != MedicalRequestEntity.Id) { MedicalRequestId = MedicalRequestEntity.Id; } } else if (!_settingFK) { MedicalRequestId = null; } }
private void FixupMedicalRequestEntity(MedicalRequest previousValue) { if (previousValue != null && previousValue.Request_Doctors.Contains(this)) { previousValue.Request_Doctors.Remove(this); } if (MedicalRequestEntity != null) { if (!MedicalRequestEntity.Request_Doctors.Contains(this)) { MedicalRequestEntity.Request_Doctors.Add(this); } if (MedicalRequestID != MedicalRequestEntity.Id) { MedicalRequestID = MedicalRequestEntity.Id; } } else if (!_settingFK) { MedicalRequestID = null; } }