public List <Skill> GetLanguageSkills(List <VacancyLanguage> vacancyLanguages) { var languageSkills = new List <Skill>(); foreach (var vacancyLanguage in vacancyLanguages) { var language = _repository.GetLanguage(vacancyLanguage.LanguageId); var languageLevel = _repository.GetLanguageLevel(vacancyLanguage.LevelId); if (language != null && languageLevel != null) { var skillName = $"{language.En}_{languageLevel.En}"; languageSkills.Add(_repository.GetSkillByName(skillName)); } } return(languageSkills); }