Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "DrinkId,Name,ShortDescription,LongDescription,Price,ImageUrl,ImageThumbnailUrl,IsPreferredDrink,InStock,CategoryId")] Drink drink)
 {
     if (ModelState.IsValid)
     {
         db.Entry(drink).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoryId = new SelectList(db.Categorise, "CategoryId", "CategoryName", drink.CategoryId);
     return(View(drink));
 }