public async Task <DocumentDto[]> HandleAsync(BrowseDocumentsByExternalId query) { _logger.LogInformation("Browsing documents by Ids"); var pagedResults = await _documentRepository.BrowseAsync(query); _logger.LogInformation("Browsed documents by Ids"); var documents = pagedResults.Items.Select(d => new DocumentDto { Id = d.Id, FileName = d.FileName, FileArray = d.FileArray, ExternalId = d.ExternalId }).ToList(); return(documents.ToArray()); }