// GET: api/Score
        public string Get()
        {
            var scoreList = _scoreManager.GetTop10Scores();

            var result = _mapper.Map <List <ScorePostModel> >(scoreList);

            return(JsonConvert.SerializeObject(result));
        }
Example #2
0
        public ActionResult Scores()
        {
            var top10Scores = _scoreManager.GetTop10Scores();

            var model = _mapper.Map <List <ScoreViewModel> >(top10Scores);

            return(View(model));
        }