Exemplo n.º 1
0
        public IActionResult Index(string filterString)
        {
            var doctorDtos = mDoctorMenager.GetAllDoctors(filterString);

            var doctorViewModels = mViewModelMapper.Map(doctorDtos);

            return(View(doctorViewModels));
        }
Exemplo n.º 2
0
        public IActionResult Index(int doctorId, string filterString)
        {
            TempData["DoctorId"] = doctorId;


            var doctorDto = mDoctorMenager.GetAllDoctors(null)
                            .FirstOrDefault(x => x.Id == doctorId);

            var prescriptionDtos = mDoctorMenager.GetAllPrescriptionForADoctor(doctorId, filterString);

            var doctorViewModels = mViewModelMapper.Map(doctorDto);

            doctorViewModels.Prescriptions = mViewModelMapper.Map(prescriptionDtos).ToList();



            return(View(doctorViewModels));
        }