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

            db.eshoper_product.Remove(eshoper_product);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id,name,imgID,description,categoryID,quantities,manufactory,condition,price,rate")] eshoper_product eshoper_product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eshoper_product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.categoryID = new SelectList(db.eshoper_category, "categoryID", "categoryName", eshoper_product.categoryID);
     return(View(eshoper_product));
 }
        // GET: eshoper_product/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            eshoper_product eshoper_product = db.eshoper_product.Find(id);

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

            if (eshoper_product == null)
            {
                return(HttpNotFound());
            }
            ViewBag.categoryID = new SelectList(db.eshoper_category, "categoryID", "categoryName", eshoper_product.categoryID);
            return(View(eshoper_product));
        }