private static void DeletandoTraineePorID(TraineeADO traineeBD) { traineeBD.DeletarTrainnePorID(5); traineeBD.DeletarTrainnePorID(6); traineeBD.DeletarTrainnePorID(7); traineeBD.DeletarTrainnePorID(8); }
private static void BuscandoTraineePorID(TraineeADO traineeBD) { Trainee t2 = traineeBD.BuscarTraineePorID(2); Console.WriteLine(t2); Console.WriteLine(); }
// TRAINEE SEM ENTITY FRAMEWORK // ========================================================================= private static void MostrandoTrainees(TraineeADO traineeBD) { List <Trainee> trainees = traineeBD.BuscarTrainee(); foreach (Trainee t in trainees) { Console.WriteLine(t); } }
private static void InserindoTrainee(TraineeADO traineeBD) { List <Trainee> trainee = new List <Trainee> { new Trainee("Pedro Lucas"), new Trainee("Alisson Jardel"), new Trainee("Gustavo Sampaio"), new Trainee("Nikolas Medeiros") }; foreach (Trainee t in trainee) { traineeBD.InserirTrainee(t); } }
// UTILIZANDO SEM ENTITY // ========================================================================= private static void TestesDoRepositorioSemEF() { //=============================== CursoADO cursoBD = new CursoADO(); TraineeADO traineeBD = new TraineeADO(); HistoricoADO historicoBD = new HistoricoADO(); // =============================== // Curso // InserindoCurso(cursoBD); // AtualizandoCurso(cursoBD); // DeletandoCursoPorID(cursoBD); MostrandoCursos(cursoBD); //BuscandoCursoPorID(cursoBD); //Console.WriteLine("*****"); //CargaMaiorOuIgual300(cursoBD); //Console.WriteLine("*****"); //CargaMenorQue300(cursoBD); //Console.WriteLine("*****"); //OrdenadoPorNome(cursoBD); //Console.WriteLine(); //Console.WriteLine("*****"); //CursosDeScott(cursoBD); Console.WriteLine(); // =============================== // Trainne //InserindoTrainee(traineeBD); // AtualizarTrainee(traineeBD); // BuscandoTraineePorID(traineeBD); // DeletandoTraineePorID(traineeBD); MostrandoTrainees(traineeBD); // =============================== // Historico //InserindoHistorico(historicoBD); var historicos = historicoBD.BuscandoHistorico(); //foreach (var h in historicos) //{ // Console.WriteLine(h); //} Console.WriteLine(); foreach (var h in historicos) { Console.WriteLine(h.HistoricoDetalhado()); } Console.WriteLine(); }
private static void AtualizarTrainee(TraineeADO traineeBD) { traineeBD.AtualizarTraineePorID(2, new Trainee("Alisson Belchior")); }