예제 #1
0
        public static void RegisterDatabase(IContainer container)
        {
            var mainDb = new MainDatabase(container.Resolve <IDbFactory>().Create());

            container.Register <IMainDatabase>(mainDb);

            var logDb = new LogDatabase(container.Resolve <IDbFactory>().Create(MigrationType.Log));

            container.Register <ILogDatabase>(logDb);
        }
예제 #2
0
        public static void RegisterDatabase(IContainer container)
        {
            var mainDb = new MainDatabase(container.Resolve<IDbFactory>().Create());

            container.Register<IMainDatabase>(mainDb);

            var logDb = new LogDatabase(container.Resolve<IDbFactory>().Create(MigrationType.Log));

            container.Register<ILogDatabase>(logDb);
        }