O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Session management

When developing applications on .NET, you will probably, sooner or later, have to deal with one or several of the following three types of applications:

  1. Web-based applications, including Silverlight applications.
  2. WinForm or WPF applications.
  3. Windows services.

There are, of course, many other types of applications, but they can all probably use the same approach regarding NHibernate session management as one of the three types mentioned above.

Web-based applications

Because of the stateless nature of web applications, we cannot (and should not!) try to maintain and use a single session across multiple page requests. However, as the creation of a session object is a very cheap operation, this should not be a problem per se. On the other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required