コード例 #1
0
        internal IEnumerable <Review> GetByProductId(int id)
        {
            // RULE Check that the parent id exists before fetching children
            var prod = _prodRepo.GetById(id);

            if (prod == null)
            {
                throw new Exception("Invalid Product Id");
            }
            return(_repo.GetByProductId(id));
        }