public bool Excluir(int id) { bool existente = _telefoneService.Find(e => e.TelefoneId == id).Any(); if (existente) { BeginTransaction(); var tipoTelefone = _telefoneService.ObterPorId(id); tipoTelefone.Delete = true; _telefoneService.Atualizar(tipoTelefone); Commit(); return(true); } return(false); }