public ActionResult New(int id) { var category = categoryRepository.GetById(id); var defaultProduct = Product.DefaultProduct(category, productOrderableService.NextPosition); return(View("Edit", ProductViewDataMap.FromModel(defaultProduct))); }
ActionResult RenderEditView(int id) { var product = productRepository.GetById(id); return(View("Edit", ProductViewDataMap.FromModel(product))); }