Hi ... the using-block calls dispose on exit of the bubble. IMHO close will be called in dispose.
On 25 Sep., 09:34, Garrett <[email protected]> wrote: > distr tran? > > We do use transactions, but always commit before leaving the Session > scope. > Could that cause any problems? > > On Sep 24, 1:28 pm, Roger Kratz <[email protected]> wrote: > > > It shouldn't matter (if you're not using distr tran). > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] On Behalf > > Of Garrett > > Sent: den 24 september 2009 13:08 > > To: nhusers > > Subject: [nhusers] Lifetime of ISession > > > Hi all > > > We use ISession like this: > > > Using(ISession ses = GetNewSession()) > > { > > //Do some work > > } > > > Should we instead use: > > > Using(ISession ses = GetNewSession()) > > { > > //Do some work > > ses.Close(); > > } > > > To guarantee that the session is closed correctly. > > Or the close handled by the implementation of Dispose in ISession > > itself? > > > Kind regards > > Garrett --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
