public void Initializer()
 {
     _unit = new MainUnitOfWork();
     _usuarioRepository = new UsuarioRepository(_unit);
     _usuarioService = new UsuarioService(_usuarioRepository);
     _tarefaRepository = new TarefaRepository(_unit);
     _tarefaService = new TarefaService(_tarefaRepository);
 }
예제 #2
0
        public HomeController()
        {
            //context
            var unit = new MainUnitOfWork();

            //repositories
            var usuarioRepository = new UsuarioRepository(unit);
            //var pontoRepository = new PontoRepository(unit);
            //var intervaloRepository = new IntervaloRepository(unit);
            var tarefaRepository = new TarefaRepository(unit);

            //services
            var usuarioService = new UsuarioService(usuarioRepository);
            var tarefaService = new TarefaService(tarefaRepository);
            //var pontoRepository = new PontoService(pontoRepository, intervaloRepository);

            //applications
            _usuarioAppService = new UsuarioAppService(usuarioRepository, usuarioService);
            _tarefaAppService = new TarefaAppService(tarefaRepository, tarefaService);
        }