public ActionResult Create(Country country) { if (ModelState.IsValid) { country.CountryId = Guid.NewGuid(); db.Countries.Add(country); db.SaveChanges(); return RedirectToAction("Index"); } return View(country); }
public ActionResult Edit(Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(country); }