public ActionResult DeleteConfirmed(int id)
        {
            InventoryCoffee inventoryCoffee = db.InventoryCoffees.Find(id);

            db.InventoryCoffees.Remove(inventoryCoffee);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Name,Description,Quantity,Price")] InventoryCoffee inventoryCoffee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventoryCoffee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(inventoryCoffee));
 }
        public ActionResult Create([Bind(Include = "ID,Name,Description,Quantity,Price")] InventoryCoffee inventoryCoffee)
        {
            if (ModelState.IsValid)
            {
                db.InventoryCoffees.Add(inventoryCoffee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(inventoryCoffee));
        }
        // GET: InventoryCoffees/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InventoryCoffee inventoryCoffee = db.InventoryCoffees.Find(id);

            if (inventoryCoffee == null)
            {
                return(HttpNotFound());
            }
            return(View(inventoryCoffee));
        }