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 2. A First Complete Sample

So far you have learned what NHibernate is and why it makes sense to use it when developing a new application. Now it is time to show how easy it is to use NHibernate in a real world application. We will create, with minimal effort, a fully working sample that allows us to write to and subsequently, read data from a database.

In this chapter, we shall:

  • Prepare our system to enable development of applications using NHibernate
  • Create a simple model of a problem domain
  • Create a database and define a mapping between the model and the database
  • Write and read data to and from the database
  • Discuss what we would have to do to achieve the same goal without NHibernate or any other ORM tool

So let's get on with it.

Prepare our ...

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