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