Beispiel #1
0
        public TurmaController()
        {
            var factory = new DatabaseFactory();

            var unitOfWork = new UnitOfWork(factory);

            var turmaRepository = new TurmaRepository(factory);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);
        }
        public ChamadaController()
        {
            var factory = new DatabaseFactory();
            var aulaRespository = new AulaRepository(factory);
            var alunoRepository = new AlunoRepository(factory);
            var turmaRepository = new TurmaRepository(factory);
            var uow = new UnitOfWork(factory);

            _aulaService = new AulaService(aulaRespository, alunoRepository, turmaRepository, uow);
        }
Beispiel #3
0
        public AlunoController()
        {
            var factory = new DatabaseFactory();

            var alunoRespository = new AlunoRepository(factory);

            var turmaRepository = new TurmaRepository(factory);

            var uow = new UnitOfWork(factory);

            _alunoService=new AlunoService(alunoRespository,turmaRepository,uow);
        }
        public AlunoDataManager()
        {
            var factory = new DatabaseFactory();

            var unitOfWork = new UnitOfWork(factory);

            var alunoRepository = new AlunoRepository(factory);

            var turmaRepository = new TurmaRepository(factory);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

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

            _control = new AlunoControl(_alunoService);
        }
Beispiel #5
0
        public AlunoDialog(IEnumerable<TurmaDTO> turmas)
        {
            var factory = new DatabaseFactory();

            var unitOfWork = new UnitOfWork(factory);

            var alunoRepository = new AlunoRepository(factory);

            var turmaRepository = new TurmaRepository(factory);

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

            InitializeComponent();

            cmbTurmas.Items.Clear();

            foreach (var turma in turmas)
            {
                cmbTurmas.Items.Add(turma);
            }
        }
Beispiel #6
0
        public Principal()
        {
            InitializeComponent();

            _instance = this;

            var factory = new DatabaseFactory();

            var unitOfWork = new UnitOfWork(factory);

            var turmaRepository = new TurmaRepository(factory);

            var alunoRepository = new AlunoRepository(factory);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

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

            AtualizaListaTurmas();

            SelecionaTurmaAnoAtual();
        }
Beispiel #7
0
        public DatabaseFixture()
        {
            Factory = new DatabaseFactory();

            UnitOfWork = new UnitOfWork(Factory);
        }