예제 #1
0
        public async Task <IActionResult> OnGetAsync()
        {
            var isQueryPresent = TryGetSearchQuery(out var query);

            if (isQueryPresent)
            {
                SearchResult = await _articlesSearchEngine.SearchAsync(
                    query,
                    GetPageNumberOrDefault(),
                    ResultsPerPage
                    );
            }

            return(Page());
        }
예제 #2
0
 public Task <SearchResultDto <ArticleSearchDto> > Handle(SearchArticlesQuery request, CancellationToken cancellationToken)
 {
     return(_articlesSearchEngine.SearchAsync(request.Query, request.PageNumber, request.ResultsPerPage));
 }