protected ISessionFactory BuildSessionFactory(global::NHibernate.Cfg.Configuration configuration) { FluentConfiguration fluentConfiguration = Fluently.Configure(configuration); fluentConfiguration.Mappings(m => { FluentConfigurationWrapper wrapper = new FluentConfigurationWrapper(configuration, m); ShowConfigurationToListeners(wrapper); if (wrapper.Database != null) { fluentConfiguration.Database(wrapper.Database); } }); return fluentConfiguration.BuildSessionFactory(); }
private void ShowConfigurationToListeners(FluentConfigurationWrapper wrapper) { BuildListeners.ForEach(bl => bl.NotifyConfiguration(wrapper)); }