public ActionResult DeleteProductImage(int id) { var productImage = _productImageService.GetProductImageById(id); if (productImage == null) { return(Json(new { success = false, message = "Image not found, Cannot Remove" })); } _productImageService.RemoveProductImage(productImage); return(Json(new { success = true, message = "Image Removed Successfully" })); }