Ejemplo n.º 1
0
 private static void DeletandoTraineePorID(TraineeADO traineeBD)
 {
     traineeBD.DeletarTrainnePorID(5);
     traineeBD.DeletarTrainnePorID(6);
     traineeBD.DeletarTrainnePorID(7);
     traineeBD.DeletarTrainnePorID(8);
 }
Ejemplo n.º 2
0
        private static void BuscandoTraineePorID(TraineeADO traineeBD)
        {
            Trainee t2 = traineeBD.BuscarTraineePorID(2);

            Console.WriteLine(t2);
            Console.WriteLine();
        }
Ejemplo n.º 3
0
        // TRAINEE SEM ENTITY FRAMEWORK
        // =========================================================================

        private static void MostrandoTrainees(TraineeADO traineeBD)
        {
            List <Trainee> trainees = traineeBD.BuscarTrainee();

            foreach (Trainee t in trainees)
            {
                Console.WriteLine(t);
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
        // 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();
        }
Ejemplo n.º 6
0
 private static void AtualizarTrainee(TraineeADO traineeBD)
 {
     traineeBD.AtualizarTraineePorID(2, new Trainee("Alisson Belchior"));
 }