Beispiel #1
0
        public async Task <List <EpaoPipelineStandardsExtractResponse> > Handle(EpaoPipelineStandardsExtractRequest request, CancellationToken cancellationToken)
        {
            _logger.LogInformation("Extracting Epao pipeline information");
            var result = await _standardRepository.GetEpaoPipelineStandardsExtract(request.EpaoId);

            var response = result.Select(o =>
                                         new EpaoPipelineStandardsExtractResponse
            {
                EstimatedDate = o.EstimateDate.UtcToTimeZoneTime().Date.ToString("MMMM yyyy"),
                Pipeline      = o.Pipeline,
                StandardName  = o.Title,
                ProviderUkPrn = o.ProviderUkPrn
            }).ToList();

            return(response);
        }
Beispiel #2
0
        public async Task <List <EpaoPipelineStandardsExtractResponse> > Handle(EpaoPipelineStandardsExtractRequest request, CancellationToken cancellationToken)
        {
            _logger.LogDebug($"GetEpaoPipelineStandardsExtractHandler: EpaoId = {request.EpaoId}");

            var result = await _standardRepository.GetEpaoPipelineStandardsExtract(request.EpaoId, request.StandardFilterId, request.ProviderFilterId, request.EPADateFilterId, _config.PipelineCutoff);

            var response = result.Select(o =>
                                         new EpaoPipelineStandardsExtractResponse
            {
                EstimatedDate   = o.EstimateDate.UtcToTimeZoneTime().Date.ToString("MMMM yyyy"),
                Pipeline        = o.Pipeline,
                StandardName    = o.Title,
                StandardVersion = o.Version,
                ProviderUkPrn   = o.ProviderUkPrn,
                ProviderName    = o.ProviderName.Replace("\"", "\"\"")
            }).ToList();

            return(response);
        }