상속: NHibernate.EmptyInterceptor
예제 #1
0
        public static void Initialize()
        {
            var usedCfg = true;
            Configuration = LoadConfigurationFromFile();
            if(Configuration == null)
            {
                Configuration = new Configuration().Configure(ConfigFile);
                SaveConfigurationToFile(Configuration);
                usedCfg = false;
            }

            var intercepter = new DataBindingIntercepter();
            SessionFactory = Configuration
                .SetInterceptor(intercepter)
                .BuildSessionFactory();
            intercepter.SessionFactory = SessionFactory;
        }
예제 #2
0
        public static void Initialize()
        {
            var usedCfg = true;

            Configuration = LoadConfigurationFromFile();
            if (Configuration == null)
            {
                Configuration = new Configuration().Configure(ConfigFile);
                SaveConfigurationToFile(Configuration);
                usedCfg = false;
            }

            var intercepter = new DataBindingIntercepter();

            SessionFactory = Configuration
                             .SetInterceptor(intercepter)
                             .BuildSessionFactory();
            intercepter.SessionFactory = SessionFactory;
        }