Hello,
In Building a Desktop To-Do Application with NHibernate, Oren Eini (a.k.a. Ayende Rahien) shares that the general recommended NHibernate practice is to use one session per form in a desktop application. In the example given, this is easily implemented because the form presenters have knowledge of the persistence layer and so can create and dispose of sessions to match their life cycles.
In a more complex application, a service/business logic layer (BLL) usually sits between UI code and the persistence layer. The UI layer knows nothing about persistence (or sessions). In such a case, how does one (or does one?) maintain one session per form ?
Thank you,
Ben