示例#1
0
        public async Task <IActionResult> DeleteVendedor(int id)
        {
            try
            {
                await _vendedorService.Remover(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch (IntegrityException e)
            {
                return(RedirectToAction(nameof(Error), new { message = e.Message }));
            }
        }