public Secretary GetEager(long id)
        {
            Secretary secretary = Get(id);

            secretary.Address            = _addressRepository.GetEager(secretary.Address.GetId());
            secretary.Address.Town       = _townRepository.GetEager(secretary.Address.Town.GetId());
            secretary.Address.Town.State = _stateRepository.GetEager(secretary.Address.Town.State.GetId());
            return(secretary);
        }
        public State GetEager(long id)
        {
            State       state = this.Get(id);
            List <Town> towns = state.GetTown();

            for (int i = 0; i < towns.Count; i++)
            {
                towns[i] = _townRepository.GetEager(towns[i].GetId());
            }
            return(state);
        }
Ejemplo n.º 3
0
        public Patient GetEager(long id)
        {
            Patient     patient     = Get(id);
            PatientFile patientfile = _patientFleRepository.GetEager(patient.patientFile.GetId());

            patient.patientFile        = patientfile;
            patient.Address            = _addressRepository.GetEager(patient.Address.GetId());
            patient.Address.Town       = _townRepository.GetEager(patient.Address.Town.GetId());
            patient.Address.Town.State = _stateRepository.GetEager(patient.Address.Town.State.GetId());
            return(patient);
        }
        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);
        }