public async Task <IActionResult> Delete(int?id) { if (id == null) { return(RedirectToAction(nameof(Error), new { message = "Id não informado!" })); } var obj = await _vendedorService.ListarPorIdAsync(id.Value); if (obj == null) { return(RedirectToAction(nameof(Error), new { message = "Vendedor não encontrado!" })); } return(View(obj)); }