Ejemplo n.º 1
0
 public ActionResult Edit(Brand brand)
 {
     if (ModelState.IsValid)
     {
         db.Entry(brand).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(brand));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,name,pack,price,active")] Beverage beverage)
 {
     if (ModelState.IsValid)
     {
         db.Entry(beverage).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(beverage));
 }