Beispiel #1
0
        static void Main(string[] args)
        {
            var alunoRepository = new AlunoRepository();
            var turmaRepository = new TurmaRepository();

            var alunoBusiness = new AlunoBusiness(alunoRepository);
            var turmaBusiness = new TurmaBusiness(turmaRepository);

            var alunoService = new AlunoService(alunoBusiness);
            var turmaService = new TurmaService(turmaBusiness);

            var alunos = alunoService.Insert(new Aluno {
                Id = 1, Nome = "AAAA"
            });
            var turmas = turmaService.Insert(new Turma
            {
                Numero  = "101",
                Periodo = Domain.ValueObj.Periodo.noite,
                Alunos  = new List <Aluno>()
                {
                    new Aluno {
                        Id = 1, Nome = "AAAA"
                    },
                    new Aluno {
                        Id = 1, Nome = "BBBB"
                    },
                    new Aluno {
                        Id = 1, Nome = "CCCC"
                    }
                }
            });

            Console.WriteLine($"{alunos.Any()} {alunos.Count()} {alunos[0].Nome}");
            Console.WriteLine($"{turmas.Any()} {turmas.Count()} {turmas[0].Numero}");
        }
Beispiel #2
0
 public GruposController()
 {
     this.grupoBusiness = new GrupoBusiness();
     this.alunoBusiness = new AlunoBusiness();
     this.turmaBusiness = new TurmaBusiness();
 }
 public TurmasController()
 {
     this.turmaBusiness  = new TurmaBusiness();
     this.escolaBusiness = new EscolaBusiness();
 }
 public AlunosController()
 {
     this.alunoBusiness = new AlunoBusiness();
     this.turmaBusiness = new TurmaBusiness();
 }
Beispiel #5
0
 public TurmaService(TurmaBusiness turmaBusiness)
 {
     _turmaBusiness = turmaBusiness;
 }
 public TurmaController()
 {
     business = new TurmaBusiness();
 }
Beispiel #7
0
 public AlunoController()
 {
     _business      = new AlunoBusiness();
     _turmaBusiness = new TurmaBusiness();
 }