public ActionResult DeleteConfirmed(int id)
        {
            FoodOrderLineItem foodOrderLineItem = db.FoodOrderLineItems.Find(id);

            db.FoodOrderLineItems.Remove(foodOrderLineItem);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Name,Description,FoodOrder,Ammount")] FoodOrderLineItem foodOrderLineItem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(foodOrderLineItem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FoodOrder = new SelectList(db.FoodOrders, "Id", "Name", foodOrderLineItem.FoodOrder);
     return(View(foodOrderLineItem));
 }
        // GET: FoodOrderLineItems/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FoodOrderLineItem foodOrderLineItem = db.FoodOrderLineItems.Find(id);

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

            if (foodOrderLineItem == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FoodOrder = new SelectList(db.FoodOrders, "Id", "Name", foodOrderLineItem.FoodOrder);
            return(View(foodOrderLineItem));
        }