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

Chapter 4. Queries

In this chapter, we will cover the following topics:

  • Using CriteriaQueries
  • Using QueryOver
  • Using QueryOver projections and aggregates
  • Using MultiCriteria
  • Using the Hibernate Query Language
  • Using MultiQuery
  • Using Named Queries
  • Using Futures
  • Eager loading child collections
  • Using LINQ to NHibernate
  • Using Detached Queries
  • Using HQL for bulk data changes

Introduction

All but the last two recipes in this chapter begin with the following common steps. In addition to the normal process of mapping our model and configuring log4net and NHibernate, this also takes care of the necessary but repetitive plumbing code.

  1. Complete the Eg.Core model and mapping project from Chapter 1.
  2. Add a new console application to your solution.
  3. Add an App.config file.
  4. In

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