简体   繁体   English

.NET 4.5中的已编译LINQ查询

[英]Compiled LINQ queries in .NET 4.5

I've read that in .NET 4.5 and EF5 queries are compiled by default, thus requiring no "work" by the developer to make their linq queries compilable. 我已经读到在.NET 4.5和EF5中,查询是默认编译的,因此开发人员无需“工作”即可使其linq查询可编译。

If I install .NET 4.5 on my server and target my app to use .net 4.5 will all my Entity Framework queries be compiled and thus receive the increase in performance? 如果我在服务器上安装了.NET 4.5,并且将我的应用定位为使用.net 4.5,我的所有实体框架查询都将被编译,从而获得性能的提高吗?

Your queries will be compiled by a background worker and cached. 您的查询将由后台工作人员编译并缓存。 This is part of the query pipeline and cannot be circumvented. 这是查询管道的一部分,无法规避。 So if you are using EF5 on .NET 4.5 your queries will be compiled and cached. 因此,如果您在.NET 4.5上使用EF5,则您的查询将被编译和缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM