diff --git a/src/Store.Infrastructure/Persistence/Repositories/ProductRepository.cs b/src/Store.Infrastructure/Persistence/Repositories/ProductRepository.cs index e557577..053e409 100644 --- a/src/Store.Infrastructure/Persistence/Repositories/ProductRepository.cs +++ b/src/Store.Infrastructure/Persistence/Repositories/ProductRepository.cs @@ -41,8 +41,10 @@ public void DeleteProductById(int productId) this.storeContext.Products.Remove(product); this.storeContext.SaveChanges(); } - - throw new NotFoundException(); + else + { + throw new NotFoundException(); + } } public ProductResponse GetProductById(int productId)