Exemplo n.º 1
0
        public async Task <NewsListVM> GetAll([FromRoute] int count, [FromRoute] int page)
        {
            NewsListVM news = null;

            if (Request.HttpContext.User.IsInRole("user"))
            {
                news = await _newsBuilder.GetAll(count, page);
            }
            else
            {
                news = await _newsBuilder.GetLimitAll(count, page);
            }
            return(news);
        }
Exemplo n.º 2
0
        public async Task <NewsListVM> GetAll()
        {
            var news = await _newsBuilder.GetAll();

            return(news);
        }
Exemplo n.º 3
0
        public async Task <NewsListVM> GetAll([FromRoute] int count, [FromRoute] int page)
        {
            var news = await _newsBuilder.GetAll(count, page);

            return(news);
        }