官术网_书友最值得收藏!

Writing a product service

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.

主站蜘蛛池模板: 万全县| 盐城市| 富川| 东乡| 汕头市| 河东区| 龙南县| 怀仁县| 西畴县| 渭源县| 凌云县| 滨州市| 罗田县| 桐柏县| 上栗县| 镇巴县| 古浪县| 界首市| 墨竹工卡县| 高淳县| 武山县| 平顺县| 子长县| 徐闻县| 塔城市| 邵阳市| 南宫市| 乐业县| 宜昌市| 延边| 永丰县| 敖汉旗| 化德县| 大名县| 香港| 弋阳县| 县级市| 吉首市| 德钦县| 九龙县| 车险|