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