Book Image

NHibernate 3.0 Cookbook

By : Jason Dentler
Book Image

NHibernate 3.0 Cookbook

By: Jason Dentler

Overview of this book

<p>NHibernate is an innovative, flexible, scalable, and feature-complete open source project for data access. Although it sounds like an easy task to build and maintain database applications, it can be challenging to get beyond the basics and develop applications that meet your needs perfectly.<br /><br />The NHibernate Cookbook explains each feature of NHibernate 3.0 in detail through example recipes that you can quickly apply to your applications. Set yourself free from stored procedures and inline SQL. Quite simply, if you build .NET applications that use databases, this book is for you.<br /><br />The book will take you from the absolute basics of NHibernate through its most advanced features and beyond, showing you how to take full advantage of each concept to quickly create amazing database applications. Beginners will learn several techniques for each of the 4 core NHibernate tasks – mapping, configuration, session &amp; transaction management, and querying – and which techniques fit best with various types of applications. In short, you will be able to build an application using NHibernate. Intermediate level readers will learn how to best implement enterprise application architecture patterns using NHibernate, leading to clean, easy-to-understand code, and increased productivity. In addition to new v3.0 features, advanced readers will learn creative ways to extend NHibernate core, as well as techniques using the NHibernate search, shards, spatial, and validation projects.</p>
Table of Contents (15 chapters)
NHibernate 3.0 Cookbook
Credits
About the Author
About the Reviewers
Preface
Index

ASP.NET Web Forms applications


To build a complete web application using ASP.NET Web Forms, first choose a mapping method from the following list of recipes:

1.1 Mapping a class with XML

1.7 Creating mappings fluently

1.8 Mapping with ConfORM

Choose a configuration method from the following recipes:

2.1 Configuring NHibernate with App.config

2.2 Configuring NHibernate with hibernate.cfg.xml

2.3 Configuring NHibernate with code

2.4 Configuring NHibernate with Fluent NHibernate

Create your database from the following list of recipes:

2.8 Generating the database

2.9 Scripting the database

2.10 Using NHibernate Schema Tool

Choose a session management method from the following recipes:

3.1 Setting up session-per-web request

3.5 Using the Conversation-per-Business transaction pattern

8.4 Using the Burrows framework

Choose a query method from the following recipies:

4.1 Using Criteria Queries

4.2 Using QueryOver

4.5 Using the Hibernate Query Language

4.7 Using Named Queries

4.10 Using LINQ to NHibernate

Choose a data access layer style from the following recipes:

6.1 Transaction Auto-wrapping for the data access layer (Data Access Objects)

6.2 Setting up an NHibernate repository

8.3 Using the Burrows framework

Finally, build your Web Forms application on top of this complete data access layer.