Hi digiboo,
The property NHibernate.Cfg.Environment.Properties returns you a
copy of the global properties, so you cannot modify it.
Typically, you want to create a global (singleton) ISessionFactory with the appropriate configuration and use that to create ISession instances.
Code:
Configuration cfg = new Configuration();
cfg.Add(NHibernate.Cfg.Environment.ConnectionString, "xxx");
ISessionFactory factory = cfg.BuildSessionFactory(); // <- this can be global
ISession session = factory.OpenSession();
Regards,
Richard