Example #1
0
        public ActionResult <List <Product> > Index(int brandId)
        {
            ProductItemDAO dao           = new ProductItemDAO(_db);
            List <Product> itemsForBrand = dao.GetAllByBrand(brandId);

            return(itemsForBrand);
        }
Example #2
0
        public ActionResult <List <Product> > Index(int brandid)
        {
            ProductItemDAO dao           = new ProductItemDAO(_db);
            List <Product> itemsForBrand = dao.GetAllByBrand(brandid);

            foreach (Product product in itemsForBrand)
            {
                product.BrandId = brandid;
            }
            return(itemsForBrand);
        }