Chapter 6. Let's Retrieve Some Data from the Database

So far we have covered the most important building blocks of NHibernate. This chapter will cover the last important building block – retrieving data. I find this topic most interesting for two reasons. One, of the total time you spend on working with NHibernate, you will spend about 90 percent time writing code to retrieve data and 10 percent on working with other parts of NHibernate. Second, you are spoilt for choices when it comes to retrieving data. I know that I have been saying the same for most features of NHibernate. But with data retrieval we really are offered number of different options. On top of that, NHibernate offers features such as lazy loading, polymorphic queries, implicit ...

Get Learning NHibernate 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.