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

Time for action – Using ConfORM to map our domain

In this example, again we want to create a simple domain model and use ConfORM to create an implicit mapping for us. We then want to use the NHibernate schema exporter to create the SQL script to create a database schema compatible with our domain.

  1. Start Visual Studio and create a new project. Choose Console Application as the project template. Name the project ConfORMSample.
  2. Add references to the two assemblies NHibernate.dll and ConfORM.dll to the project.
  3. Create a folder Domain in the project.
  4. Add classes Customer, Order, and LineItem to the Domain folder of the project. The classes should contain the same code as defined in the preceding exercise in steps 4 through 6.
  5. To the Program class, add the ...

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