Exemplo n.º 1
0
        // GET: ProductDetailsController
        public ActionResult Index()
        {
            var products = _product.FindAll();
            var brands   = _brand.FindAll();

            foreach (var item in products)
            {
                item.Name = $"{brands.Where(p=>p.Id == item.BrandId).FirstOrDefault().Name} {item.Name}";
            }
            return(View(products));
        }
        // GET: ProductDetailsController
        public ActionResult Index()
        {
            var cart     = SessionHelper.GetDeserializeSessionData <List <ProductDetails> >(HttpContext.Session, "cart");
            var products = _product.FindAll();
            var brands   = _brand.FindAll();

            foreach (var item in products)
            {
                item.Name = $"{brands.Where(p=>p.Id == item.BrandId).FirstOrDefault().Name} {item.Name}";
            }
            return(View(products));
        }
        // GET: MobileBrandController
        public ActionResult Index()
        {
            var data = _brand.FindAll();

            return(View(data));
        }
 // GET: ProductDetailsController
 public ActionResult Index()
 {
     return(View(_product.FindAll()));
 }