public ActionResult EditPeopleType(PeopleType type) { if (ModelState.IsValid) { db.Entry(type).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("PeopleType"); } return View(type); }
public ActionResult CreatePeopleType(PeopleType type) { if (ModelState.IsValid) { db.PeopleTypes.Add(type); db.SaveChanges(); return RedirectToAction("PeopleType"); } return View(type); }