private void CompleteIllnessHistory(MedicalRecord entity) { for (int i = 0; i < entity.IllnessHistory.Count; i++) { entity.IllnessHistory[i] = illnessesRepository.GetObject(entity.IllnessHistory[i].Code); } }