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