Yes, I use lazy-loading, and it does not seem realistic to turn it off in 
production.
However, it should not be a problem, because data read from the database is 
always stored in a local variable inside the using.
It is used to fill an appropriate DTO object.
and this DTO object is sent back, as shown in code below

DtoObject ReadSomeData()
{
  DtoObject dtoObject = null;
  
  using(ISession session = nhibernateHelper.OpenSession())
  {
 var localVariable = ReadData(session);
 dtoObject = ConvertToDTO(localVariable);
  } 

  return dtoObject;
}

so the lifetime of the read object is scoped within the using.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to