Ejemplo n.º 1
0
        public ActionResult Delete(int productId)
        {
            Product deletedProduct = db.DeleteProduct(productId);

            if (deletedProduct != null)
            {
                TempData["message"] = string.Format("Продукт \"{0}\" был удалён",
                                                    deletedProduct.Name);
            }
            return(RedirectToAction("IndexProduct"));
        }
Ejemplo n.º 2
0
 public int DeleteProduct(int id)
 {
     return(_productContext.DeleteProduct(id));
 }
Ejemplo n.º 3
0
 public void Delete(Guid id)
 {
     productContext.DeleteProduct(id);
 }