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

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.

主站蜘蛛池模板: 凤山市| 得荣县| 汝城县| 阜南县| 平邑县| 永顺县| 安远县| 永州市| 饶河县| 高平市| 新乐市| 瑞丽市| 盐源县| 汪清县| 莎车县| 横山县| 郴州市| 柳河县| 贺兰县| 大竹县| 稷山县| 乌鲁木齐县| 麻江县| 盐城市| 清涧县| 泸水县| 台东县| 循化| 呈贡县| 林西县| 天门市| 邯郸市| 西华县| 东莞市| 庆城县| 清苑县| 土默特左旗| 大方县| 措美县| 准格尔旗| 调兵山市|