public ActionResult Edit(Brand brand) { if (ModelState.IsValid) { db.Entry(brand).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(brand)); }
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)); }