public Doctor GetEager(long id) { Doctor doctor = Get(id); List <BusinessDay> businessDays = new List <BusinessDay>(); if (doctor.BusinessDay != null) { foreach (BusinessDay day in doctor.BusinessDay) { businessDays.Add(_businessDayRepository.GetEager(day.GetId())); } } doctor.BusinessDay = businessDays; doctor.Specialty = _specialityRepository.Get(doctor.Specialty.GetId()); doctor.Address = _addressRepository.GetEager(doctor.Address.GetId()); doctor.Address.Town = _townRepository.GetEager(doctor.Address.Town.GetId()); doctor.Address.Town.State = _stateRepository.GetEager(doctor.Address.Town.State.GetId()); doctor.DoctorGrade = _doctorGradeRepository.Get(doctor.DoctorGrade.GetId()); return(doctor); }
public Speciality Get(long id) { return(_specialityRepository.Get(id)); }