Exemplo n.º 1
0
        public ActionResult GetPopularCitiesByOption(RequestPopularCitites request)
        {
            var cities = dbContext.Places
                         .Where(p => p.AdditionalOptions.Contains(request.Criteria))
                         .Select(p => p.City).ToList();

            return(Json(new { Cities = cities }));
        }
Exemplo n.º 2
0
        public ActionResult GetPopularCitiesByRegion(RequestPopularCitites request)
        {
            var cities = dbContext.Places
                         .Where(p => p.Region == request.Criteria)
                         .Select(p => p.City)
                         .ToList();

            return(Json(new { Cities = cities }));
        }