Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've run into the limits of what NHibernate 3.0's LINQ provider is capable of and decided it's time to learn about one of the more powerful (or at least feature-complete) options: the QueryOver API.

The problem is, I have zero experience with ICriteria, and all of the tutorials I've been able to find online either:

  1. Assume I'm an ICriteria expert and simply show me how to convert ICriteria code to the new fluent interface, or
  2. Are trivial "here's how you do an inner join" examples that don't really help me understand more complex concepts like projections, subqueries, requirements, or whatever other magic the API is capable of.

What should I read to really learn about QueryOver, and how to make full use of it?


migration rejected from Nov 21 '14 at 8:34

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by gnat, GlenH7, MichaelT, Kilian Foth, Bart van Ingen Schenau Nov 21 '14 at 8:34

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

This post is the best resource I have found so far for using QueryOver.

Another resource that we've been passing around at work is the Nhibernate 3.0 Cookbook. I literally just got my hands on it, so I don't have a review for you.


Here is a very good explanation of QueryOver Andrew Whitaker - NHibernate QueryOver Series. It contains:

  1. Why QueryOver?
  2. Basics and Joining
  3. Selecting
  4. Transforming
  5. Materializing Results
  6. Query Building Techniques
  7. Using SQL Functions
  8. Working with Subqueries

Not the answer you're looking for? Browse other questions tagged or ask your own question.