Ejemplo n.º 1
0
        public List <PracticeAreaModel> GetAll()
        {
            IPracticeAreaRepository practiceAreaRepository = new PracticeAreaRepository();
            var practiceAreaModels = practiceAreaRepository.GetAll().ToList();

            return(MappingExtensions.MapList <PracticeArea, PracticeAreaModel>(practiceAreaModels));
        }
Ejemplo n.º 2
0
        public List <SelectListItem> GetAllPracticeArea()
        {
            IPracticeAreaRepository practiceAreaRepo = new PracticeAreaRepository();
            List <SelectListItem>   practiceAreaList = new List <SelectListItem>();

            practiceAreaList = practiceAreaRepo.GetAll().Where(x => !string.IsNullOrEmpty(x.PracticeAreaName)).Select(x => new SelectListItem()
            {
                Text = x.PracticeAreaName, Value = x.ID.ToString()
            }
                                                                                                                      ).ToList();
            return(practiceAreaList);
        }