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 with App.config

NHibernate offers several methods for configuration and a number of configuration settings.

In this recipe, I'll show you how to configure NHibernate using your application's configuration file with a minimal number of settings to get your application up and running quickly. This recipe also forms the base for several other recipes in this chapter.

Getting ready

  1. Complete the Eg.Core model and mapping recipes from Chapter 1, Models and Mappings.
  2. Add a console application project to your solution called ConfigByAppConfig.
  3. Set it as the Startup project for your solution.
  4. In the ConfigByAppconfig project, add references to NHibernate.dll and NHibernate.ByteCode.Castle.dll from the Lib folder.
  5. In ConfigByAppconfig, add ...

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