Ejemplo n.º 1
0
        public async Task OnGetAsync()
        {
            MainLayout.ShoppingBasket = BasketHelper.GetBasket(HttpContext.Session);
            ViewData["MainLayout"]    = MainLayout;


            Highlighted = await _ds.GetHighlightedProductsAsync();

            OnSale = await _ds.GetProductsOnSaleAsync();

            Latest = await _ds.GetLatestProductsAsync();

            BestSellingProducts = _ds
                                  .GetBestSellingProducts()

                                  .Select(p => _ds
                                          .GetProductById(p.ProductId));
        }
Ejemplo n.º 2
0
 public async Task <IEnumerable <Product> > getAsync()
 {
     return(await _ds.GetProductsOnSaleAsync());
 }