I want to configure NHibernate only once and reuse the session factory to open different sessions to manipulate database,
however the hubs are considered as transient objects and loose object state when client is initializing another request to the hub. The only way so far that i have read about is to make the objects static in order to reuse it.
Is there some other way of achieving this without making the objects static ?
myConfiguration = new Configuration();
mySessionFactory = myConfiguration.BuildSessionFactory();
mySession = mySessionFactory.OpenSession();
Thank you in advance :)