是否需要以亚音速编译 linq 查询?

发布于 2024-08-02 04:16:07 字数 227 浏览 3 评论 0原文

我想知道是否有必要编译亚音速实体的 linq 查询?

例如,我需要编译以下 linq 查询吗?

var comments = from a in All()
                           where a.ParentCommentId == ArticleCommentId
                           select a;

I'd like to know if it's necessary to compile linq queries to the subsonic entities?

For example would I'd need to compile the following linq query?

var comments = from a in All()
                           where a.ParentCommentId == ArticleCommentId
                           select a;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小矜持 2024-08-09 04:16:07

编译查询是一种可选的优化,可让您避免多次解析表达式树。它从来都不是必需的,但可能是满足您的性能要求所必需的。

Compiled queries are an optional optimization that allow you avoid parsing an expression tree multiple times. It's never required, but may be necessary to meet your performance requirements.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文