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