Exemplo n.º 1
0
        public IActionResult Edit(int id)
        {
            var productVM    = new ProductEditViewModel();
            var productTypes = _productTypeBLL.GetAll();

            var product = _productBLL.GetByIdIncludingAll(id);

            productVM = ProductEditViewModel.FromModel(product, productTypes);

            ViewData["Title"] = productVM.IsCreateMode ? "Create" : "Update";



            return(View(productVM));
        }