public ActionResult Index() { HomePageView homePageView = new HomePageView(); homePageView.Categories = base.GetCategories(); homePageView.BasketSummary = base.GetBasketSummaryView(); GetFeaturedProductsResponse response = _productCatalogueService.GetFeaturedProducts(); homePageView.Products = response.Products; return(View(homePageView)); }
public ActionResult Index(int Id = 0) { HomePageView homePageView = new HomePageView(); homePageView.Categories = base.GetAllCategoriesHavingAccess(Id); GetFeaturedProductResponse response = new GetFeaturedProductResponse(); response = _productCatalogService.GetFeaturedProducts(new GetFeaturedProductRequest { RetailerId = Id }); homePageView.Products = response.Products; return(View("Index", homePageView)); }
public GetFeaturedProductsResponse GetFeaturedProducts() { lock (_getTopSellingProductsLock) { var response = new GetFeaturedProductsResponse(); var productViews = _cachStorage.Retrieve <IEnumerable <FeaturedProductDto> >(CacheKeys.TopSellingProducts.ToString()); if (productViews == null) { response = _realProductCatalogueService.GetFeaturedProducts(); _cachStorage.Store(CacheKeys.TopSellingProducts.ToString(), response.Products); } else { response.Products = productViews; } return(response); } }