常用方法
常用方法
常用方法
常用方法
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)); }