public ActionResult DeleteConfirmed(int id)
        {
            BOOK_DISH bOOK_DISH = db.BOOK_DISH.Find(id);

            db.BOOK_DISH.Remove(bOOK_DISH);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "C_id_dish,name_dish,time_pr,C_id_cuisine_national,C_id_cooking_method,C_id_type_dish,C_id_cuisine_type,calories,imageData")] BOOK_DISH bOOK_DISH)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bOOK_DISH).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.C_id_cooking_method   = new SelectList(db.COOKING_METHOD, "C_id_cooking_method", "name_method", bOOK_DISH.C_id_cooking_method);
     ViewBag.C_id_cuisine_national = new SelectList(db.CUISINE_NATIONAL, "C_id_cuisine_national", "name_cuisine", bOOK_DISH.C_id_cuisine_national);
     ViewBag.C_id_cuisine_type     = new SelectList(db.CUISINE_TYPE, "C_id_cuisine_type", "name_cuisine", bOOK_DISH.C_id_cuisine_type);
     ViewBag.C_id_type_dish        = new SelectList(db.TYPE_DISH, "C_id_type_dish", "name_type", bOOK_DISH.C_id_type_dish);
     return(View(bOOK_DISH));
 }
        // GET: BOOK_DISH/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BOOK_DISH bOOK_DISH = db.BOOK_DISH.Find(id);

            if (bOOK_DISH == null)
            {
                return(HttpNotFound());
            }
            return(View(bOOK_DISH));
        }
        // GET: BOOK_DISH/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BOOK_DISH bOOK_DISH = db.BOOK_DISH.Find(id);

            if (bOOK_DISH == null)
            {
                return(HttpNotFound());
            }
            ViewBag.C_id_cooking_method   = new SelectList(db.COOKING_METHOD, "C_id_cooking_method", "name_method", bOOK_DISH.C_id_cooking_method);
            ViewBag.C_id_cuisine_national = new SelectList(db.CUISINE_NATIONAL, "C_id_cuisine_national", "name_cuisine", bOOK_DISH.C_id_cuisine_national);
            ViewBag.C_id_cuisine_type     = new SelectList(db.CUISINE_TYPE, "C_id_cuisine_type", "name_cuisine", bOOK_DISH.C_id_cuisine_type);
            ViewBag.C_id_type_dish        = new SelectList(db.TYPE_DISH, "C_id_type_dish", "name_type", bOOK_DISH.C_id_type_dish);
            return(View(bOOK_DISH));
        }