internal IEnumerable <Review> GetByContractorId(int id)
        {
            var con = _conRepo.GetById(id);

            if (con == null)
            {
                throw new Exception("Inavlid Id");
            }
            return(_repo.GetByContractorId(id));
        }
Exemple #2
0
        internal IEnumerable <Review> GetByContractorId(int id)
        {
            // RULE Check that the parent id exists before fetching children
            var prod = _contRepo.GetById(id);

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