public async Task <PaginatedList <CertificateSummaryResponse> > Handle(GetCertificateHistoryRequest request, CancellationToken cancellationToken)
        {
            const int pageSize = 100;

            var searchResult = await _certificateRepository.GetCertificateHistory(
                request.EndPointAssessorOrganisationId,
                request.PageIndex ?? 1,
                pageSize,
                request.SearchTerm,
                request.SortColumn,
                request.SortDescending,
                _ignoreStatuses);

            // Please Note:- Cannot seem to automap this with custom value/type converters
            // so dealing with it manually for now.
            var certificateHistoryResponses = MapCertificates(searchResult);

            return(await certificateHistoryResponses);
        }
Пример #2
0
        public async Task <PaginatedList <CertificateSummaryResponse> > Handle(GetCertificateHistoryRequest request, CancellationToken cancellationToken)
        {
            const int pageSize       = 10;
            var       ignoreStatuses = new List <string>
            {
                Domain.Consts.CertificateStatus.Deleted,
                Domain.Consts.CertificateStatus.Draft,
            };

            var certificates = await _certificateRepository.GetCertificateHistory(
                request.EndPointAssessorOrganisationId,
                request.PageIndex ?? 1,
                pageSize, ignoreStatuses);

            // Please Note:- Cannot seem to automap this with custom value/type converters
            // so dealing with it manually for now.
            var certificateHistoryResponses = MapCertificates(certificates);

            return(await certificateHistoryResponses);
        }