public async Task <IActionResult> OnGetAsync() { var isQueryPresent = TryGetSearchQuery(out var query); if (isQueryPresent) { SearchResult = await _articlesSearchEngine.SearchAsync( query, GetPageNumberOrDefault(), ResultsPerPage ); } return(Page()); }
public Task <SearchResultDto <ArticleSearchDto> > Handle(SearchArticlesQuery request, CancellationToken cancellationToken) { return(_articlesSearchEngine.SearchAsync(request.Query, request.PageNumber, request.ResultsPerPage)); }