public ActionResult DeleteConfirmed(int id) { objProductImageBO.DeleteImage(id); int productId = Convert.ToInt32(TempData["productId"]); return(RedirectToAction("Index", new { id = productId })); }
public ActionResult DeleteConfirmed(int id) { List <ProductImage> lstProductImage = objProductImageBO.GetImages(id); foreach (ProductImage p in lstProductImage) { objProductImageBO.DeleteImage(p.PKImageId); } objProductBO.DeleteProduct(id); return(RedirectToAction("Index")); }