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}"); }
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(); }
public TurmaService(TurmaBusiness turmaBusiness) { _turmaBusiness = turmaBusiness; }
public TurmaController() { business = new TurmaBusiness(); }
public AlunoController() { _business = new AlunoBusiness(); _turmaBusiness = new TurmaBusiness(); }