Do not close the session until you finish working with the object.
This is one of the biggest challenges with NHIbernate IMHO: defining session boundaries.
In an ASP.NET application, this is quite simple: the session starts at the beginning of the request, and you can close the session at the end of the request.
In a WinForms application, this is a bit more complicated: you need to clearly define the boundaries of the session start and when the session is closed. In WinForms applications, I usually define "Tasks", which are some kind of Unit-Of-Work. Each task has a session. A session is created / opened when a task is created and closed when a task is completed.
In addition, you can also define some associations as non-lazy. However, if you do, you must make sure that performance is not affected.
Frederik gheysels
source share