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