编译NHibernate Linq表达式 [英] Compile NHibernate Linq expressions

查看:74
本文介绍了编译NHibernate Linq表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以编译NHibernate linq/lambda表达式,以使它们不会在每次使用时重新评估?

Can NHibernate linq/lambda expressions be compiled so they aren't reevaluate on every use?

推荐答案

将它们编译(成委托)会使它们在内存中执行,这是您绝对不希望的.

Compiling them (into delegates) would make them execute in memory, which is something you definitely do NOT want.

它们必须保留为表达式树,才能解析为Criteria表达式(2.x contrib提供程序)或HQL树(3.x提供程序),然后解析为SQL.

They must stay as expression trees in order to be parsed into Criteria expressions (2.x contrib provider) or HQL trees (3.x provider), and then into SQL.

这篇关于编译NHibernate Linq表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆