Пример #1
0
        public ActionResult Index()
        {
            var allPages = this.pagesData.All().OrderByDescending(p => p.CreatedOn);
            var pages    = this.Mapper.Map <PageViewModel>(allPages).ToList();

            var model = new IndexPagesViewModel
            {
                Pages = pages
            };

            return(this.View(model));
        }
Пример #2
0
        // GET: Administration/Pages
        public ActionResult Index()
        {
            var pages = this.Data.Pages
                .All()
                .OrderByDescending(p => p.CreatedOn)
                .To<PageViewModel>();

            var model = new IndexPagesViewModel
            {
                Pages = pages.ToList()
            };

            return this.View(model);
        }