// GET: Solutions
        public ActionResult Index()
        {
            var solutions   = _solutionService.GetSolutions();
            var solutionsVM = Mapper.Map <IEnumerable <Solution>, IEnumerable <SolutionViewModel> >(solutions);

            return(View(solutionsVM));
        }
Example #2
0
        // Starting page
        public ActionResult Index()
        {
            try
            {
                var latestSolutions = _solutionService.GetSolutions()
                                      .OrderByDescending(s => s.LastTimeOpened).Take(6);

                var latestSolutionsVM = Mapper.Map <IEnumerable <Solution>, IEnumerable <SolutionViewModel> >(latestSolutions);

                return(View(latestSolutionsVM));
            }
            catch (Exception ex)
            {
                return(View().WithError(ex.Message));;
            }
        }
Example #3
0
        public ActionResult GetSolutions()
        {
            var solutions = _solutionService.GetSolutions();

            return(Ok(solutions));
        }