public AbstractDomainModel GetAll(Core.Enumerations.SearchCriteriaEnum searchCriteria) { searchDoctor = new DomainModel.Models.DoctorsSearch(); switch (searchCriteria) { case Core.Enumerations.SearchCriteriaEnum.GET_COUNTRIES: searchDoctor.Countries = countryRepository.GetAll(); break; case Core.Enumerations.SearchCriteriaEnum.GET_SPECIALTIES: searchDoctor.Specialties = specialtyRepository.GetAll(); break; case Core.Enumerations.SearchCriteriaEnum.GET_DOCTORS: searchDoctor.Doctors = providerRepository.GetAllDoctors(); break; case Core.Enumerations.SearchCriteriaEnum.GET_PHARMACISTS: searchDoctor.Pharmacists = providerRepository.GetAllPharmacists(); break; case Core.Enumerations.SearchCriteriaEnum.GET_NURSE: searchDoctor.Nurses = providerRepository.GetAllNurses(); break; case Core.Enumerations.SearchCriteriaEnum.GET_TREATMENTS: searchDoctor.Treatments = treatmentRepository.GetAll(); break; default: break; } return(searchDoctor); }