O'Reilly logo

NHibernate 3.0 Cookbook by Jason Dentler

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

Configuring NHibernate using ConfORM Mappings

As we saw in Chapter 1, ConfORM uses conventions to build HbmMapping objects that can be added directly to the NHibernate configuration. In this recipe, I'll show you how to add ConfORM mappings to our NHibernate configuration.

Getting ready

  1. Complete Mapping with ConfORM recipe in Chapter 1.
  2. Add a console application project to your solution named ConfigWithConfORM.
  3. Set it as the Startup project for your solution.
  4. In the ConfigWithConfORM project, add references to NHibernate.dll and NHibernate.ByteCode.Castle.dll in the Lib folder.
  5. In ConfigWithConfORM, add a reference to the Eg.ConfORMMappings project.

How to do it...

  1. Add an App.config with the following configuration:
    <?xml version="1.0" encoding="utf-8" ...

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