opening a session doesn't mean you will open a database connection. once you call begin transaction or a CRUD operation it will open the connection if it doesn't exist.
I used to mange my session and transactions all within an http module. whether I needed an open connection or not. however i found that managing the session scope at the module level and transactions with an ActionFilter keeps the session-per-request scope while efficiently using transactions. On Jan 6, 6:57 pm, José F. Romaniello <[email protected]> wrote: > Am I wrong if I say that this code should NOT open a connection? > > NHibernate.ISession ormSession = GetSessionFactory().OpenSession(); > > NHibernate.Context.CurrentSessionContext.Bind(ormSession);
-- 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.
