Hi. I don't know how to do this using a configuration file.
If you make your configuration programatically it is simple.
But you will have two configurations, and you will have two sessions one for each configuration.
something like this:
Code:
Configuration cfg1 = new Configuration();
cfg1.SetProperty(NHibernate.Cfg.Environment.ConnectionProvider,"NHibernate.Connection.DriverConnectionProvider");
cfg1.SetProperty(NHibernate.Cfg.Environment.Dialect,"NHibernate.Dialect.FirebirdDialect");
cfg1.SetProperty(NHibernate.Cfg.Environment.ConnectionDriver,"NHibernate.Driver.FirebirdDriver");
cfg1.SetProperty(NHibernate.Cfg.Environment.QuerySubstitutions,"your substitutions");
cfg1.SetProperty(NHibernate.Cfg.Environment.ConnectionString,"conection string 1");
... add your mapping files to cfg1 ...
Configuration cfg2 = new Configuration();
cfg2.SetProperty(NHibernate.Cfg.Environment.ConnectionProvider,"NHibernate.Connection.DriverConnectionProvider");
cfg2.SetProperty(NHibernate.Cfg.Environment.Dialect,"NHibernate.Dialect.MySQLDialect");
cfg2.SetProperty(NHibernate.Cfg.Environment.ConnectionDriver,"NHibernate.Driver.MySQLDriver");
cfg2.SetProperty(NHibernate.Cfg.Environment.QuerySubstitutions,"your substitutions");
cfg2.SetProperty(NHibernate.Cfg.Environment.ConnectionString,"conection string 2");
... add your mapping files to cfg2 ...
ISession session1 = cfg1.BuildSessionFactory().OpenSession();
ISession session2 = cfg2.BuildSessionFactory().OpenSession();
And then you can use witch one you wants.