3

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?

1 Answer 1

3

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.

2
  • 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
    Jul 15, 2009 at 19:59
  • 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
    Jul 15, 2009 at 20:02

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.