We learned a lot in this chapter about how to retrieve data stored in the database. Querying data from a database is one of the most important aspects of an application. Users, in general, want to use the collected data to generate some meaningful reports displayed on-screen or printed on paper. Furthermore, in a typical application, read operations are much more frequent than write operations. In this regard, we would consider this chapter as one of the most important ones of the whole book.
In this chapter, we specifically covered:
How to query data by using the LINQ to NHibernate provider, which is new in NHibernate 3
Alternative methods provided by NHibernate to retrieve data such as the criteria query API, the
QueryOver
API, which is new in NHibernate 3 and the Hibernate Query Language (HQL)Lazy loading properties of an entity, which is a new addition to NHibernate 3
How to send multiple queries to the server in one go
The possibility to execute bulk data operations when using HQL...