public async Task <IActionResult> Delete(int id) { try { try { await _medicoService.DeletarMedicoAsync(id); return(RedirectToAction(nameof(Index))); } catch (Exception) { return(RedirectToAction(nameof(Erro), new { mensagem = "Erro durante o processamento" })); } } catch (Exception ex) { throw ex; } }