public ActionResult DeleteProductImage(int id) { var modelFromRepo = _imageService.GetImageById(id); if (modelFromRepo == null) { return(NotFound()); } _imageService.DeleteProductImage(modelFromRepo); _imageService.SaveChanges(); return(NoContent()); }
public void DeleteProductPicture(int id) { var productPic = productImageService.GetProductImageById(id); productImageService.DeleteProductImage(productPic); }
public ActionResult <ProductImage> Delete(int id) { return(_productImageService.DeleteProductImage(id)); }