/// <summary>
        /// Retrieves all Categories.
        /// </summary>
        /// <param name="request">SubjectBrowseInput request.</param>
        /// <exception cref="CourseSearchServiceException">The exception details of the error that has occurred.</exception>
        /// <returns>SubjectBrowseOutput object populated with Category details.</returns>
        public SubjectBrowseOutput GetCategories(SubjectBrowseInput request)
        {
            SubjectBrowseOutput sbo;

            try
            {
                sbo = _courseService.GetCategories(request);
            }
            catch (Exception ex)
            {
                CourseSearchServiceException exc = new CourseSearchServiceException("An error has occured in the CourseSearchService", ex);
                throw exc;
            }

            return(sbo);
        }
        /// <summary>
        /// Retrieves Courses matching the search criteria in the CourseListInput request.
        /// </summary>
        /// <param name="request">CourseListInput request object containing search criteria.</param>
        /// <exception cref="CourseSearchServiceException">The exception details of the error that has occurred.</exception>
        /// <returns>CourseListOutput object containing matching Course details.</returns>
        public CourseListOutput CourseList(CourseListInput request)
        {
            CourseListOutput clo;

            try
            {
                clo = _courseService.GetCourseList(request);
            }
            catch (Exception ex)
            {
                CourseSearchServiceException exc = new CourseSearchServiceException("An error has occured in the CourseSearchService", ex);
                throw exc;
            }

            return(clo);
        }
        /// <summary>
        /// Retrieves Course details for the list of Course ids provided in the CourseDetailInput request.
        /// </summary>
        /// <param name="request">CourseDetailInput request object containing Course ids to search for.</param>
        /// <exception cref="CourseSearchServiceException">The exception details of the error that has occurred.</exception>
        /// <returns>CourseDetailOutput object containing matching Course details.</returns>
        public CourseDetailOutput CourseDetail(CourseDetailInput request)
        {
            CourseDetailOutput cdo;

            try
            {
                cdo = _courseService.GetCourseDetails(request);
            }
            catch (Exception ex)
            {
                CourseSearchServiceException exc = new CourseSearchServiceException("An error has occured in the CourseSearchService", ex);
                throw exc;
            }

            return(cdo);
        }
        /// <summary>
        /// Retrieves Provider details matching search criteria contained within the request.
        /// </summary>
        /// <param name="request">ProviderSearchInput request object containing search criteria.</param>
        /// <exception cref="CourseSearchServiceException">The exception details of the error that has occurred.</exception>
        /// <returns>ProviderSearchOutput object populated with matching Provider details.</returns>
        public ProviderSearchOutput ProviderSearch(ProviderSearchInput request)
        {
            ProviderSearchOutput pso;

            try
            {
                pso = _providerService.GetProviders(request);
            }
            catch (Exception ex)
            {
                CourseSearchServiceException exc = new CourseSearchServiceException("An error has occured in the CourseSearchService", ex);
                throw exc;
            }

            return(pso);
        }
        /// <summary>
        /// Retrieves Provider details for the Provider Id provided in the request.
        /// </summary>
        /// <param name="request">ProviderDetailsInput request containing ProviderId.</param>
        /// <exception cref="CourseSearchServiceException">The exception details of the error that has occurred.</exception>
        /// <returns>ProviderDetailsOutput object populated with Provider details for the requested Provider Id.</returns>
        public ProviderDetailsOutput ProviderDetails(ProviderDetailsInput request)
        {
            ProviderDetailsOutput pdo;

            try
            {
                pdo = _providerService.GetProviderDetails(request);

                if (pdo == null)
                {
                    throw new Exception();
                }
            }
            catch (Exception ex)
            {
                CourseSearchServiceException exc = new CourseSearchServiceException("An error has occured in the CourseSearchService", ex);
                throw exc;
            }

            return(pdo);
        }