Exemple #1
0
        public ActionResult NewProducts()
        {
            var repo     = new Repos.ProductRepo();
            var prodList = repo.GetAllProducts();

            return(View(prodList));
        }
        public List <console.Models.tblProduct> getAll()
        {
            var repo     = new Repos.ProductRepo();
            var prodList = repo.GetAllProducts();

            return(prodList);
        }
        public void  getSession()
        {
            var repo     = new Repos.ProductRepo();
            var prodList = repo.GetAllProducts();

            Session["CartItems"] = prodList;
        }
Exemple #4
0
        // GET: Product
        public ActionResult Index(int?id)
        {
            var repo = new Repos.ProductRepo();

            if (id == null)
            {
                var prodList = repo.GetAllProducts();
                return(View(prodList));
            }
            else
            {
                var prodList = repo.GetProductsByCategory(id);
                return(View(prodList));
            }
        }