Exemplo n.º 1
0
        public ActionResult GetPageData(int page = 1, int size = 10)
        {
            List <Links> list      = LinksService.GetAll().OrderBy(p => p.Status).ThenByDescending(p => p.Recommend).ThenByDescending(p => p.Id).Skip((page - 1) * size).Take(size).ToList();
            var          total     = LinksService.GetAll().Count();
            var          pageCount = Math.Ceiling(total * 1.0 / size).ToInt32();

            return(PageResult(list, pageCount, total));
        }
Exemplo n.º 2
0
        public ActionResult Get()
        {
            List <Links> list = LinksService.GetAll().OrderBy(p => p.Status).ThenByDescending(p => p.Recommend).ThenByDescending(p => p.Id).ToList();

            return(ResultData(list));
        }
Exemplo n.º 3
0
        public ActionResult Get()
        {
            var list = LinksService.GetAll <LinksDto>().OrderBy(p => p.Status).ThenByDescending(p => p.Recommend).ThenByDescending(p => p.Id).NotCacheable().ToList();

            return(ResultData(list));
        }