Book Image

Learning NHibernate 4

Book Image

Learning NHibernate 4

Overview of this book

Table of Contents (18 chapters)
Learning NHibernate 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 joins, fetching strategies, and so on, which makes data retrieval a very interesting concept to learn. I do not want to throw jargon at you and confuse you more. We are going to learn all these features in this chapter. Let me give you a brief overview...