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