public ActionResult Edit(PaymentForm model) { if (ModelState.IsValid) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(model); }
public ActionResult Create(PaymentForm model) { if (ModelState.IsValid) { db.PaymentForm.Add(model); db.SaveChanges(); return RedirectToAction("Index"); } return View(model); }
public ActionResult Delete(PaymentForm model) { db.Entry(model).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); return RedirectToAction("Index"); }