Ejemplo n.º 1
0
        public ActionResult Create()
        {
            ProductManagerViewModule viewModel = new ProductManagerViewModule();

            viewModel.Product           = new Product();
            viewModel.ProductCategories = productCategories.Collection();
            return(View(viewModel));
        }
Ejemplo n.º 2
0
        public ActionResult Edit(string Id)
        {
            Product product = context.Find(Id);

            if (product == null)
            {
                return(HttpNotFound());
            }
            else
            {
                ProductManagerViewModule viewModel = new ProductManagerViewModule();
                viewModel.Product           = product;
                viewModel.ProductCategories = productCategories.Collection();

                return(View(viewModel));
            }
        }