Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //程序没有运行
            try
            {
                EfContext.InitStorage(new SimpleEfContextStorage());
                // 环境初始化
                var acDomain = new DefaultAcDomain();
                _acDomain = acDomain;
                _acDomain.AddService(typeof(ILoggingService), new Log4NetLoggingService(_acDomain));
                _acDomain.AddService(typeof(IAcSessionStorage), new SimpleAcSessionStorage());
                acDomain.Init();
                _acDomain.RegisterRepository(new List <string> {
                    "EdiEntities",
                    "AcEntities",
                    "InfraEntities",
                    "IdentityEntities"
                }, typeof(AcDomain).Assembly);

                Run(args);
            }
            catch (Exception ex)
            {
                _acDomain.LoggingService.Error(ex);
                Console.WriteLine(ex.Message);
                Console.WriteLine(@"按任意键退出");
                Console.ReadKey();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //程序没有运行
            try
            {
                EfContext.InitStorage(new SimpleEfContextStorage());
                // 环境初始化
                var acDomain = new DefaultAcDomain();
                _acDomain = acDomain;
                _acDomain.AddService(typeof(ILoggingService), new Log4NetLoggingService(_acDomain));
                _acDomain.AddService(typeof(IAcSessionStorage), new SimpleAcSessionStorage());
                acDomain.Init();
                _acDomain.RegisterRepository(new List<string> {
                        "EdiEntities",
                        "AcEntities",
                        "InfraEntities",
                        "IdentityEntities"
                    }, typeof(AcDomain).Assembly);

                Run(args);
            }
            catch (Exception ex)
            {
                _acDomain.LoggingService.Error(ex);
                Console.WriteLine(ex.Message);
                Console.WriteLine(@"按任意键退出");
                Console.ReadKey();
            }
        }
Ejemplo n.º 3
0
 static ApiTest()
 {
     EfContext.InitStorage(new SimpleEfContextStorage());
     AcDomain.AddService(typeof(ILoggingService), new Log4NetLoggingService(AcDomain));
     AcDomain.AddService(typeof(IAcSessionStorage), new SimpleAcSessionStorage());
     AcDomain.Init();
     AcDomain.RegisterRepository(new List <string>
     {
         "EdiEntities",
         "AcEntities",
         "InfraEntities",
         "IdentityEntities"
     }, typeof(AcDomain).Assembly);
     AcDomain.RegisterEdiCore();
 }