public AulaDataManager()
        {
            var unitOfWork = Injection.Get<IUnitOfWork>();

            var aulaRepository = Injection.Get<IAulaRepository>();

            var alunoRepository = Injection.Get<IAlunoRepository>();

            var turmaRepository = Injection.Get<ITurmaRepository>();

            _aulaService = new AulaService(aulaRepository, alunoRepository, turmaRepository, unitOfWork);

            _alunoService = new AlunoService(alunoRepository, turmaRepository, unitOfWork);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

            _control = new AulaControl(_aulaService);
        }
Exemple #2
0
        public AulaDataManager()
        {
            var unitOfWork = Injection.Get <IUnitOfWork>();

            var aulaRepository = Injection.Get <IAulaRepository>();

            var alunoRepository = Injection.Get <IAlunoRepository>();

            var turmaRepository = Injection.Get <ITurmaRepository>();

            _aulaService = new AulaService(aulaRepository, alunoRepository, turmaRepository, unitOfWork);

            _alunoService = new AlunoService(alunoRepository, turmaRepository, unitOfWork);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

            _control = new AulaControl(_aulaService);
        }
        public AulaDataManager()
        {
            var factory = new DatabaseFactory();

            var unitOfWork = new UnitOfWork(factory);

            var aulaRepository = new AulaRepository(factory);

            var turmaRepository = new TurmaRepository(factory);

            var alunoRepository = new AlunoRepository(factory);

            _aulaService = new AulaService(aulaRepository, alunoRepository, turmaRepository, unitOfWork);

            _alunoService = new AlunoService(alunoRepository, turmaRepository, unitOfWork);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

            _control = new AulaControl(_aulaService);
        }