public ActionResult Edit(Zone zone) { if (ModelState.IsValid) { db.Entry(zone).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(zone); }
public ActionResult Create(Zone zone) { if (ModelState.IsValid) { db.Zones.Add(zone); db.SaveChanges(); return RedirectToAction("Index"); } return View(zone); }