Exemplo n.º 1
0
        public async Task <IActionResult> Edit(Product product)
        {
            if (product == null)
            {
                return(NotFound());
            }

            _context.Products.Update(product);
            await _context.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <IActionResult> Edit(Supplier supplier)
        {
            if (supplier == null)
            {
                return(NotFound());
            }

            _context.Suppliers.Update(supplier);
            await _context.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }