Beispiel #1
0
        public IActionResult DeleteConfirmed(int id)
        {
            try
            {
                if (id != 0)
                {
                    _veiculoApplication.Remover(id);

                    return(RedirectToAction("Index"));
                }
                return(View());
            }
            catch (Exception ex)
            {
                string message = string.Format("Atenção: {0}", ex.Message);
                ModelState.AddModelError(string.Empty, message);
                return(View());
            }
        }