Пример #1
0
        public ActionResult Edit(int id)
        {
            var area   = areaRepository.Get(id);
            var cities = cityRepository.GetAll().OrderBy(c => c.Name);

            if (area == null)
            {
                return(HttpNotFound());
            }
            var viewModel = new AreaFormViewModel
            {
                Area   = area,
                Cities = cities
            };

            return(View(viewModel));
        }