Exemple #1
0
        public async Task <IActionResult> AverageRating(string type)
        {
            List <PriceRatingIndexViewModel> report = null;

            switch (type)
            {
            case "highestAverage":
                report = _repository.HighestAverageRatingReport();
                break;

            case "lowestAverage":
                report = _repository.LowestAverageRatingReport();
                break;

            case "highestAveragePriceIndex":
                report = _repository.HighestAveragePriceIndexRatingReport();
                break;

            case "lowestAveragePriceIndex":
                report = _repository.LowestAveragePriceIndexRatingReport();
                break;

            default:
                report = _repository.HighestAverageRatingReport();
                break;
            }

            return(View(report));
        }