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