public ActionResult ExcluirConfirma(int id) { if (_clienteNegocios.BuscarAgendamento(id) == 0) { var telefone = _telefoneNegocios.BuscarIdTelefone(id); var cliente = _clienteNegocios.BuscarId(id); _telefoneNegocios.Deletar(telefone); _clienteNegocios.Deletar(cliente); // nao podemos utilizar return view pois nao passamaos nenhum parametro para a INDEX return(RedirectToAction("Index")); } else { Interaction.MsgBox("Nao e possivel excluir clientes com agendamentos!", MsgBoxStyle.OkOnly, "AVISO"); return(RedirectToAction("Index")); } }