public async Task <DoctorDto> GetByIdAsync(int id)
        {
            var doctor = await _doctorsRepository.GetByIdAsync(id);

            doctor.Patients = (await _patientsRepository.GetDoctorPatientsAsync(id)).ToList();
            doctor.Diseases = (await _diseasesRepository.GetDoctorDiseasesAsync(id)).ToList();
            return(doctor);
        }
Exemple #2
0
        public async Task <ActionResult> Edit(int id)
        {
            var result = await _doctorsRepository.GetByIdAsync(id);

            return(View(result));
        }