public async Task FillSkillsFromAPI(SkillCategories id) { try { SkillsServices skillservicesobject = new SkillsServices(); if (SkillsHelper.AllSysytemSkills == null || SkillsHelper.AllSysytemSkills.Any() == false) { //TODO: to be decided Later SkillsHelper.AllSysytemSkills = await skillservicesobject.GeTskillDetails(URLConfig.GeTskillDetailsurl + "1"); //if ( !string.IsNullOrEmpty(SelectedJobTypeId)) //{ // SkillsHelper.AllSysytemSkills = await skillservicesobject.GeTskillDetails(URLConfig.GeTskillDetailsurl + SelectedJobTypeId); //} //else //{ // SkillsHelper.AllSysytemSkills = await skillservicesobject.GeTskillDetails(URLConfig.GeTskillDetailsurl + EmployeeProfileHelper.EmployeeCurrentProfile.JobTypeId); //} } var observableAll = new ObservableCollection <SkillsModel>(SkillsHelper.AllSysytemSkills); var temp = SkillsHelper.AllSysytemSkills.Where(sk => sk.skillCategoryId == ((int)id).ToString()); var observableForCategory = new ObservableCollection <SkillsModel>(temp); if (id == SkillCategories.Languages) { Languageskills = observableForCategory; } else if (id == SkillCategories.ComputerSkills) { Computerskills = observableForCategory; } else if (id == SkillCategories.Other) { TechnicalSkills = observableForCategory; } else if (id == SkillCategories.All) { //other is the Speciality Skills there is a potional to be changed and Compine other Factors observableAll = new ObservableCollection <SkillsModel>(observableAll.Where(sc => sc.skillCategoryId == ((int)(SkillCategories.Other)).ToString())); if (observableAll == null) { observableAll = new ObservableCollection <SkillsModel>(); } else { AllSkills = observableAll; } } } catch (Exception ex) { var logged = new LoggedException.LoggedException("Error in SkillsList function", ex); await logged.LoggAPI(); } }