// [ActionName(nameof(GetBySearchTerm))] public async Task <IActionResult> GetBySearchTerm(string term, int page = 1, int pageSize = 5) { Tuple <int, List <Article> > result; if (!string.IsNullOrEmpty(term)) { result = await _articlesService.GetBySearch(term, page, pageSize); } else { result = await _articlesService.GetArticles(page, pageSize); } return(StatusCodeAndDtoWrapper.BuildSuccess(ArticleListDtoResponse.Build(result.Item2, "search/", page, pageSize, result.Item1))); }