Is there somewhere an overview where is displayed or explained in which order Linq methods must be called?
For example, you’ll get an exception if you first call Take(200) and then OrderBy(..). But you won’t get an exception when you switch those calls.
So my question is, does someone know some documentation where this is explained? Or knows a place where this kind of information is listed?
The reason you can’t call Take(200) before calling OrderBy is that Take(200) forces the NHibernate LINQ provider to evaluate the linq query. Once the query has been evaluated, it cannot add further SQL clauses to the mix without re-evaluating the query, something that might have unintended consequences.