//GET public IActionResult Delete(int?id) { try { if (id == null) { return(NotFound()); } var obj = _carroService.FindById(id.Value); if (obj == null) { return(NotFound()); } return(View(obj)); } catch (Exception ex) { throw new Exception(ex.Message); } }