Im new in Nhibernate. I have application with lazy loading. I want to write method
public User GetUser(int id)
in my UserPersister class. Later, in application I want use some referenced property like User.Role or User.Address. It wan`t work if I close Session that I used to retreive user. My first idea was to create Singleton Session and I will be able to get all data then. I read some articles that it is bad idea becouse of performance and memory leaking. Is it true? What is the solution of this problem ?
Regards Martin