[N]Hibernate Sessions
- by Jaimal Chohan
A silly question, perhaps, but at this time of night, StackOverFlow is my only friend.
I'm playing with NHibernate and wanted to factualize these 2 statements regarding Sessions in web applications.
1) You should only ever have 1 ISessionFactory per database for the lifecycle of an application.
2) You should only have 1 ISession per HttpRequest or batch of HttpRequests (i.e. conversation)
[I don't want tool or framework recommendation, just want to confirm the above]