public async Task <IActionResult> Delete(int id) { try { await _servicoVendedor.RemoveAsync(id); return(RedirectToAction(nameof(Index))); } catch (IntegridadeException e) { return(RedirectToAction(nameof(Error), new { message = e.Message })); } }