public IActionResult Get(int id)
        {
            var product = _productManager.GetProduct(id);

            ViewBag.Suppliers = _supplierManager.GetSuppliers().ToList();

            if (product is not null)
            {
                return(View("Edit", product));
            }
            else
            {
                return(View("Error", id));
            }
        }
示例#2
0
        //
        // GET: /Supplier/

        public ViewResult Index()
        {
            var suppliers = _store.GetSuppliers();

            return(View(suppliers));
        }