Skip to content

Commit 82d2b70

Browse files
committed
Fixing DeleteProductById method from ProductRepository
1 parent d5586b9 commit 82d2b70

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Store.Infrastructure/Persistence/Repositories/ProductRepository.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ public void DeleteProductById(int productId)
4141
this.storeContext.Products.Remove(product);
4242
this.storeContext.SaveChanges();
4343
}
44-
45-
throw new NotFoundException();
44+
else
45+
{
46+
throw new NotFoundException();
47+
}
4648
}
4749

4850
public ProductResponse GetProductById(int productId)

0 commit comments

Comments
 (0)