Esempio n. 1
0
 public IActionResult DoctorsForUser(int professionId)
 {
     try
     {
         return(View(_commonServices.GetAllDoctors().Where(d => d.IsApproved)
                     .Join(_commonServices.GetAllProfessions(),
                           d => d.ProfessionId,
                           p => p.Id,
                           (doctor, profession) => new DoctorScheduleProfessionForTablesViewModel(doctor, profession))
                     .Where(d => d.Profession.Id == professionId)));
     }
     catch (Exception ex)
     {
         return(View("Error"));
     }
 }