Пример #1
0
        public IActionResult All(int id = 1)
        {
            var model = new ListOfPredictionsViewModel
            {
                PageNumber       = id,
                ItemsPerPage     = ItemsPerPage,
                PredictionsCount = this.predictionsService.PredictionsCount(),
                Predictions      = this.predictionsService.All(id, ItemsPerPage),
            };

            return(this.View(model));
        }
Пример #2
0
        public IActionResult MyPredictions(int id = 1)
        {
            var userId = this.User.FindFirst(ClaimTypes.NameIdentifier).Value;
            var model  = new ListOfPredictionsViewModel
            {
                PageNumber       = id,
                ItemsPerPage     = ItemsPerPage,
                PredictionsCount = this.predictionsService.PredictionsByUserCount(userId),
                Predictions      = this.predictionsService.PredictionsByUser(userId, id, ItemsPerPage),
            };

            return(this.View(model));
        }