Esempio n. 1
0
        public ActionResult Products(int pid)
        {
            IEnumerable <Product> products = FakeDb.GetProductsByCategoryId(pid);
            Category          c            = FakeDb.GetCategoryById(pid);
            ProductsViewModel viewModel    = new ProductsViewModel();

            viewModel.Products = products;
            viewModel.Category = c;
            return(View(viewModel));
        }