Esempio n. 1
0
        public ActionResult EditProduct(int?id)
        {
            if (id == null)
            {
                return(View("PageNotFound"));
            }

            var productViewModel = adminApi.CreateProductViewModelByProductId((int)id);

            if (productViewModel == null)
            {
                return(View("PageNotFound"));
            }

            ViewData["Id"] = id;

            return(View(productViewModel));
        }