Beispiel #1
0
        public async Task <IActionResult> Index()
        {
            var orderStatistics = await _orderApiClient.GetOrderStatistics();

            var viewRanking = await _productApiClient.GetProductViewRanking(10);

            var ratingRanking = await _productApiClient.GetProductMostSalesRanking(10);

            var favoriteRanking = await _productApiClient.GetProductFavoriteRanking(10);

            return(View(new DashBoardViewModel()
            {
                OrderStatistics = orderStatistics.ResultObject,
                viewRanking = viewRanking,
                salesRanking = ratingRanking,
                favoriteRanking = favoriteRanking
            }));
        }