Ejemplo n.º 1
0
        // GET: Solution
        public IActionResult Index()
        {
            var model = new ListViewModel()
            {
                Solutions = _solutionService.GetAll()
            };

            return(View(model));
        }
        public IActionResult Index()
        {
            var solutions = service.GetAll().ProjectTo <SolutionListingViewModel>().ToArray();

            SolutionTablesViewModel model = new SolutionTablesViewModel
            {
                MostRecent = solutions.OrderByDescending(s => s.CreationTime),

                MostViewed = solutions.OrderByDescending(s => s.Views)
            };


            return(View(model));
        }