Esempio n. 1
0
        public async Task <IHttpActionResult> GetSkillMatrixByCompetency(int competencyId)
        {
            var skills = await querySkillMatrix
                         .FindWithinSkills(competencyId);

            // return an http 200 status with the SkillMatrixViewModel
            return(Ok(SkillMatrixViewModel.Create(competencyId, skills).Skills));
        }
Esempio n. 2
0
        public async Task <IHttpActionResult> GetSkillMatrixByCompetencyAndLevel(int competencyId, int jobFunctionLevel)
        {
            // Try to locate all skills that belong to the selected competency and level Id.
            var skills = await this.querySkillMatrix
                         .FindWithin(competencyId, skill => skill.CompetencyId == competencyId && skill.JobFunctionLevel == jobFunctionLevel);

            // return an http 200 status with the SkillMatrixViewModel
            return(Ok(SkillMatrixViewModel.Create(competencyId, skills)));
        }
Esempio n. 3
0
        public async Task <IHttpActionResult> GetSkillMatrixByParentCompetencyAndLevel(int parentCompetencyId, int jobFunctionLevel)
        {
            // list to store the competencies to query
            List <int> competencies = new List <int> {
                parentCompetencyId
            };

            competencies.AddRange(await this.queryCompetency.FindCompetenciesIdByParentId(parentCompetencyId));

            // hashSet to store unique skills
            var SkillsHashSet = new HashSet <Skill>(await this.querySkillMatrix.FindWithinSkills(competencies, jobFunctionLevel), new SkillComparer());

            // return an http 200 status with the SkillMatrixViewModel
            return(Ok(SkillMatrixViewModel.Create(parentCompetencyId, SkillsHashSet)));
        }