Esempio n. 1
0
        public ActionResult New(int id)
        {
            var category       = categoryRepository.GetById(id);
            var defaultProduct = Product.DefaultProduct(category, productOrderableService.NextPosition);

            return(View("Edit", ProductViewDataMap.FromModel(defaultProduct)));
        }
Esempio n. 2
0
        ActionResult RenderEditView(int id)
        {
            var product = productRepository.GetById(id);

            return(View("Edit", ProductViewDataMap.FromModel(product)));
        }