public ActionResult Create() { ProductCategoryViewModel viewModel = new ProductCategoryViewModel(); viewModel.Product = new Product(); viewModel.ProductCategories = contextCategory.Collection(); // Product p = new Product(); return(View(viewModel)); }
// GET: ProductManager public ActionResult Index() { List <Product> products = context.Collection().ToList(); return(View(products)); }