示例#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);
        }
示例#2
0
        public async Task <NewsListVM> GetAll()
        {
            var news = await _newsBuilder.GetAll();

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

            return(news);
        }