I use linq to nhibernate and the IQueryable.Where function in an application I'm building. And what mystifies me is how do the Expression
s I create and pass to the Where function of a INhibernateQueryable affect performance.
I'm not really sure what are the gotchas I should avoid in writing these query Expressions, in terms of performance. If I pass in an expression with a funtion call like:
CurrentSession.Linq<ENTITY>().Where(x => x.IsBuyOrder && CheckVariousProperties(x))
Is it going to retrieve every record where IsBuyOrder = true
and then call the function CheckVariousProperties
on them as soon as the deferred execution is no longer deferred?
How do function calls affect LinqToNhibernate performance?
What kind of things should be avoided in a LINQ to Nhibernate query Expression?