Esempio n. 1
0
        public IActionResult Index()
        {
            ProductTypesListViewModel model = new ProductTypesListViewModel
            {
                ProductTypes = this.productTypeService.All <ProductTypeViewModel>(),
            };

            return(this.View(model));
        }
        //Method Name: New
        //Purpose of the Method: This method returns the New.cshtml file in the Products folder, which will contain a form to add a new product.
        //Arguments in Method: None.
        public IActionResult New()
        {
            ProductTypesListViewModel model = new ProductTypesListViewModel(context);

            return(View(model));
        }