Exemplo n.º 1
0
        public async Task <IActionResult> GetByCategory([FromRoute] string category, int page = 1, int pageSize = 5)
        {
            Tuple <int, List <Article> > articles = await _articlesService.GetArticlesByCategory(category, pageSize, page);

            return(StatusCodeAndDtoWrapper.BuildSuccess(ArticleListDtoResponse.Build(articles.Item2,
                                                                                     "/by_category/{category}", page, pageSize, articles.Item1)));
        }