Exemple #1
0
        public IActionResult Update(City aCity)
        {
            if (ModelState.IsValid)
            {
                bool isUpdate = _iCityManager.Update(aCity);

                if (isUpdate)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(ViewBag.ErrorMessage = "City has been update failed!");
                }
            }

            ViewBag.CountryList = GetAllCountry();
            return(View(aCity));
        }