public async Task <IActionResult> Delete(Guid id) { try { await _service.RemoverCliente(id); return(NoContent()); } catch (Exception ex) { Log.Error(ex, "Erro ao excluir {Cliente}", id); return(StatusCode(500, "Erro ao excluir cliente.")); } }
public async Task <IActionResult> Excluir(Guid id) { await _appService.RemoverCliente(id); return(RedirectToAction("Index")); }