public IEnumerable <SkillSmart.Dto.SkillsSpeciality> GetAll(string specialityId) { var SkillMapListCategory = ServiceFactory.GetSkillMap().GetSkillsByCategoryId(specialityId); var allSkillList = ServiceFactory.GetSkill().GetAll(); List <SkillSmart.Dto.SkillsSpeciality> skillList = new List <SkillSmart.Dto.SkillsSpeciality>(); foreach (SkillMap mapSkill in SkillMapListCategory) { if (mapSkill.CategoryId.ToString() == specialityId) { var skillId = mapSkill.SkillId; foreach (Skill skillSelect in allSkillList) { if (skillSelect.Id.ToString() == skillId) { SkillSmart.Dto.SkillsSpeciality skillObj = new SkillSmart.Dto.SkillsSpeciality(); skillObj.SkillMapId = mapSkill.Id.ToString(); skillObj.SkillName = skillSelect.SkillName; skillList.Add(skillObj); break; } } } } return(skillList); }
public IEnumerable<SkillSmart.Dto.SkillsSpeciality> GetAll(string specialityId) { var SkillMapListCategory = ServiceFactory.GetSkillMap().GetSkillsByCategoryId(specialityId); var allSkillList = ServiceFactory.GetSkill().GetAll(); List<SkillSmart.Dto.SkillsSpeciality> skillList = new List<SkillSmart.Dto.SkillsSpeciality>(); foreach (SkillMap mapSkill in SkillMapListCategory) { if (mapSkill.CategoryId.ToString() == specialityId) { var skillId = mapSkill.SkillId; foreach (Skill skillSelect in allSkillList) { if (skillSelect.Id.ToString() == skillId) { SkillSmart.Dto.SkillsSpeciality skillObj = new SkillSmart.Dto.SkillsSpeciality(); skillObj.SkillMapId = mapSkill.Id.ToString(); skillObj.SkillName = skillSelect.SkillName; skillList.Add(skillObj); break; } } } } return skillList; }