Example #1
0
        public ActionResult BrandProducts(int brandId)
        {
            var brand    = _brandService.GetBrandById(brandId);
            var products = _productService.GetAllProducts(brand: brandId);
            var model    = new BrandDetailModel
            {
                Id                = brand.Id,
                Description       = brand.Description,
                Name              = brand.Name,
                SubProducts       = products.Items.MapTo <IList <SimpleProductModel> >(),
                TotalProductCount = products.TotalCount,
            };

            return(View(model));
        }
 protected override async Task OnInitializedAsync()
 {
     brand = await Client.GetBrandDetail(_BrandId);
 }