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)); }
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))); }
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))); }