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

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.

主站蜘蛛池模板: 襄垣县| 原平市| 额尔古纳市| 大邑县| 德安县| 花垣县| 定州市| 分宜县| 嘉祥县| 武鸣县| 仁化县| 上饶县| 乌什县| 新丰县| 山丹县| 会理县| 五莲县| 安吉县| 鹿泉市| 玛曲县| 融水| 尖扎县| 新巴尔虎右旗| 巩留县| 凤翔县| 黑山县| 锦屏县| 岳西县| 锡林郭勒盟| 泾源县| 玉环县| 封开县| 化隆| 青州市| 大足县| 夏河县| 龙南县| 渭南市| 建宁县| 宁南县| 溆浦县|