public ActionResult Create(Country country) { if (ModelState.IsValid) { db.Country.Add(country); db.SaveChanges(); return RedirectToAction("Details", new { id = country.ID }); } return View(country); }
public ActionResult Edit(Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Details", new { id = country.ID }); } return View(country); }