Beispiel #1
0
        public void Initialize()
        {
            AuthenticationServiceFactory.SetCurrent(new FormsAuthenticationFactory());
            TypeAdapterFactory.SetCurrent(new AutomapperTypeAdapterFactory());
            MapperHelper.Initialise();

            EntityValidatorFactory.SetCurrent(new DataAnnotationsEntityValidatorFactory());

            var unitOfWork = new UnitOfWork();

            parametrosUsuarioRepository = new ParametrosUsuarioRepository(unitOfWork);
            usuarioRepository           = new UsuarioRepository(unitOfWork);
            logAcessoRepository         = new LogAcessoRepository(unitOfWork);
            centroCustoRepository       = new CentroCustoRepository(unitOfWork);
            moduloRepository            = new ModuloRepository(unitOfWork);
            perfilRepository            = new PerfilRepository(unitOfWork);
            messageQueue       = new MessageQueue();
            usuarioAppService  = new UsuarioAppService(usuarioRepository, logAcessoRepository, perfilRepository, moduloRepository, messageQueue);
            centroCustoService = new CentroCustoAppService(centroCustoRepository, usuarioAppService, messageQueue);
        }
Beispiel #2
0
 public ParametrosUsuarioAppService(IParametrosUsuarioRepository parametrosUsuarioRepository, ICentroCustoAppService centroCustoService, MessageQueue messageQueue)
     : base(messageQueue)
 {
     this.parametrosUsuarioRepository = parametrosUsuarioRepository;
     this.centroCustoService          = centroCustoService;
 }