コード例 #1
0
        public IActionResult GetJobTitle(int id)
        {
            var _jobtitle = _jobtitleRepository.GetSingle(s => s.Id == id);

            if (_jobtitle == null)
            {
                return(NotFound());
            }
            var jobtitle = Mapper.Map <JobTitleViewModel>(_jobtitle);

            return(Ok(jobtitle));
        }
コード例 #2
0
        public Profile GetBasicProfileById(int profileId)
        {
            var profile = _profileRepository.GetSingle(p => p.Id == profileId);

            profile.Title    = _titleRepository.GetSingle(t => t.Id == profile.TitleId);
            profile.JobType  = _jobTypeRepository.GetSingle(j => j.Id == profile.JobTypeId);
            profile.JobTitle = _jobTitleRepository.GetSingle(jt => jt.Id == profile.JobTitleId);
            return(profile);
        }