Esempio n. 1
0
        public static string SelectedProfByLetters(string str)
        {
            string        result      = "";
            int           i           = 1;
            List <string> professions = ProfessionsService.GetProfessionsByLetters(str);

            professions.ForEach(c => { result += $"למקצוע {c} הקש {i++}"; });
            return(result);
        }
Esempio n. 2
0
        public static List <Professionals> GetFilteredProfessionals(int letterForProf, int profession, int area, int city)
        {
            using (RecommendationsEntities3 db = new RecommendationsEntities3())
            {
                List <string>                    profName      = ProfessionsService.GetProfessionsByLetters(VoiceService.SelectedLetters(letterForProf));
                List <Cities>                    cities        = GetCitiesByArea(area);
                int                              prof          = ProfessionsService.GetProfessionbyName(profName[profession]);
                int                              c             = cities[city].CityId;
                List <Professionals>             professionals = db.Professionals.ToList();
                List <ProfessionForProfessional> specforProf   = db.ProfessionForProfessional.ToList();
                List <Professionals>             result        = professionals.Where(p => p.Users.City == c && prof == specforProf.FirstOrDefault(s => s.Professional == p.ProfessionalId).Profession).ToList();

                return(result);
            }
        }