예제 #1
0
        private async Task ViewbagAddress()
        {
            var cities = await _sharedService.GetCities();

            ViewBag.Cities = cities;
            var city       = cities.FirstOrDefault();
            var districtid = city.Id;

            ViewBag.Districts = await _sharedService.GetDistricts(districtid);
        }
예제 #2
0
        public async Task <IActionResult> GetDistricts(int cityid)
        {
            var model = await _sharedService.GetDistricts(cityid);

            return(Json(model));
        }