internal IEnumerable <Job> GetJobsByContractorId(int contractorId) { Contractor exists = _crepo.getById(contractorId); if (exists == null) { throw new Exception("Invalid Id"); } return(_repo.GetJobsByContractorId(contractorId)); }
internal Contractor getByID(int id) { Contractor exists = _repo.getById(id); if (exists == null) { throw new Exception("Invalid Id"); } return(exists); }