Exemple #1
0
        public ActionResult Create(Billing billing)
        {
            if (ModelState.IsValid)
            {
                db.Billing.Add(billing);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

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