For the sake of simplicity, our product service has two functions:
- List<int> getProducts(int categoryId)
- Product getProduct(int prodId)
The intent of the two methods is quite clear. The first returns a list of product IDs given a category ID, and the second returns product details (as an object) given a product ID.