Ejemplo n.º 1
0
        public ApprenticeshipDetails GetFrameworkProviderDetails(string frameworkId, int ukprn, int location)
        {
            var model = _apprenticeshipProviderRepository.GetCourseByFrameworkId(
                ukprn,
                location,
                frameworkId);

            if (model != null)
            {
                return(model);
            }

            throw new HttpResponseException(HttpStatusCode.NotFound);
        }
        public ActionResult <ApprenticeshipDetails> GetFrameworkProviderDetails(string frameworkId, [RequiredFromQuery] int ukprn, [RequiredFromQuery] int location)
        {
            var model = _apprenticeshipProviderRepository.GetCourseByFrameworkId(
                ukprn,
                location,
                frameworkId);

            if (model != null)
            {
                return(model);
            }

            return(NotFound());
        }
        private ApprenticeshipProviderDetailResponse GetFramework(ApprenticeshipProviderDetailQuery message)
        {
            var model = _apprenticeshipProviderRepository.GetCourseByFrameworkId(
                message.UkPrn,
                message.LocationId,
                message.FrameworkId);

            var apprenticeshipProduct = _getFrameworks.GetFrameworkById(message.FrameworkId);

            var response = CreateResponse(model, apprenticeshipProduct, ApprenticeshipTrainingType.Framework);

            response.RegulatedApprenticeship = false;
            return(response);
        }