Beispiel #1
0
        public void DeletePermanently(int productId)
        {
            Product product = _productsRepository.GetById(productId);

            if (!product.IsDeleted)
            {
                throw new CanNotDeletePermanentlyNotMarkedToDeleteException(product);
            }

            _productPhotosRepository.Delete(true, product.Photos.ToArray());
            _productsRepository.Delete(true, productId);
        }
Beispiel #2
0
 public void Delete(params int[] id)
 {
     _productPhotosRepository.Delete(id);
 }