views:

419

answers:

1

Hi

I am a newbie with Fluent NHibernate and have got a question that may not be asked correctly, so please bear with me.

I am a bit confused about the best way to manage NHibernate sessions in a web application using Fluent NHibernate.

I have read this post but am unsure whether I need to apply this method to my web application or whether it is already taken care of within Fluent NHibernate itself?

Can anyone help?

+2  A: 

All that Fluent does is simplify the mapping and the creation of a configuration and thence a session factory. Anything you read on session management is equally applicable whether or not you use Fluent.

David M
I thought as much, thanks
Rippo
Actually as an afterthought can you/anyone provide a link where I can actually read and understand what I need to do to best manage nHibernate sessions in a web application. I seem to be getting myself in a muddle. Many thanks
Rippo
The link you provided gives a fairly good explanation. The key thing is to think of a session as a unit of work - don't keep it around for too long. Session per request in a web application is a common approach.
David M

related questions