public ActionResult Insert() { var model = new CityCountries { Countries = countryRepository.Countries.ToList(), City = new City() }; return View(model); }
public ActionResult Insert(CityCountries cityCountry) { if (ModelState.IsValid) { var city = cityCountry.City; cityRepository.Save(city); return RedirectToAction("List"); } return View(cityCountry); }