简体   繁体   English

哪种查询最适合在Entity Framework中针对概念模型进行查询?

[英]Which kinds of queries is better for querying against conceptual model in Entity Framework?

There are 3 way for querying against conceptual model in EF : 在EF中有3种方法可以查询概念模型:

  1. LINQ to Entity LINQ转实体
  2. Entity SQL 实体SQL
  3. Query Builder Methods 查询生成器方法

Which one is better for which situation? 哪种情况适合哪种情况? Is there any performance issues for these 3 type of querying? 这三种查询是否存在性能问题?

In general, all these ways are appropriate for production. 通常,所有这些方式都适合生产。
In case you plan to reuse the LINQ to Entities query use CompiledQuery. 如果您打算重复使用LINQ to Entities查询,请使用CompiledQuery。 There is a number of performance peculiarities in Entity Framework - take a look at this MSDN article . 在Entity Framework中有许多性能上的特殊性-看看这篇MSDN文章

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

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