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