public OperationResult Delete(DeleteProductPictureVM command) { OperationResult result = new OperationResult(); var productPicture = _productPictureRepository.Get(command.Id); if (productPicture == null) { return(result.Failed(ValidateMessage.IsExist)); } productPicture.Delete(); _productPictureRepository.SaveChanges(); return(result.Succeeded()); }
public IActionResult OnPostDelete(DeleteProductPictureVM command) { var result = _productPictureApplication.Delete(command); return(new JsonResult(result)); }