Esempio n. 1
0
        public async Task <ActionResult> Edit(Models.Product product)
        {
            if (ModelState.IsValid)
            {
                await shopDbService.UpdateAsync(product);

                return(RedirectToAction(nameof(Details), new { id = product.Id }));
            }

            return(View());
        }
Esempio n. 2
0
        public async Task <ActionResult> Edit(Models.Customer customer)
        {
            if (ModelState.IsValid)
            {
                await shopDbService.UpdateAsync(customer);

                return(RedirectToAction(nameof(Details), new { id = customer.Id }));
            }

            return(View());
        }