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

Chapter 6. Sessions and Transactions

In this chapter, we will discuss the NHibernate session object which is used to communicate with the database.

In this chapter, we shall:

  • Discuss the session and the transaction objects
  • Present the session factory object
  • Implement an application that saves and retrieves data
  • Analyze various methods to manage sessions in the most common application types

So let's get on with it.

What are sessions and transactions

Sessions and transactions are two of the most important objects that the NHibernate framework provides. Through a session object, we are able to communicate with a database and execute various operations on it. A transaction object, in turn, gives us an instrument at hand, which makes managing multiple operations ...

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