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

The LINQ to NHibernate provider

The introduction of LINQ in .NET 3.5 has changed the way developers deal with sets of data. Where in the times prior to LINQ, the foreach loop has ruled the game when dealing with sets or lists of data, it is now LINQ that is the king of the game.

LINQ to objects is centered on the interface IEnumerable<T> and manipulates sets of objects that live in-memory. LINQ to NHibernate, on the other hand, is a LINQ provider used to access the database and retrieve data in the same way one would access and manipulate in-memory objects. The LINQ to NHibernate driver is centered on the IQueryable<T> interface.

Defining the root of our query

It all starts with a simple extension method for the NHibernate session object or, more ...

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