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)); }
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)); }