Example #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}");
        }
Example #2
0
 public GruposController()
 {
     this.grupoBusiness = new GrupoBusiness();
     this.alunoBusiness = new AlunoBusiness();
     this.turmaBusiness = new TurmaBusiness();
 }
Example #3
0
 public TurmasController()
 {
     this.turmaBusiness  = new TurmaBusiness();
     this.escolaBusiness = new EscolaBusiness();
 }
Example #4
0
 public AlunosController()
 {
     this.alunoBusiness = new AlunoBusiness();
     this.turmaBusiness = new TurmaBusiness();
 }
Example #5
0
 public TurmaService(TurmaBusiness turmaBusiness)
 {
     _turmaBusiness = turmaBusiness;
 }
 public TurmaController()
 {
     business = new TurmaBusiness();
 }
Example #7
0
 public AlunoController()
 {
     _business      = new AlunoBusiness();
     _turmaBusiness = new TurmaBusiness();
 }