public SelectListItem[] SelectJobTitles()
        {
            var jobTitles = _jobTitles.Get().Select(jobTitle => new SelectListItem
            {
                Text  = jobTitle.JobTitleName,
                Value = jobTitle.JobTitleID,
            }).ToArray();

            return(jobTitles);
        }
示例#2
0
        public List<JobTitleDTO> GetJobTitles()
        {
            var jobTitles = _jobTitles.Get();

            return jobTitles.Select(jobTitle => Mapper.Map<JobTitle, JobTitleDTO>(jobTitle)).ToList();
        }