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; }
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; }