实体框架建议检索数据 [英] entity framework recommendation to retrieve data
问题描述
实体框架是否建议一次检索数据块或一次检索小查询并获得整体。哪个更有效率?建议使用哪个?
如果我们使用了很多include,那么它会生成很多外连接来生成数据库处理所需的T-sql。这将是有利的。但是如果我们运行小型查询而不是立即获取所有块,则会调用一个db调用,这样就可以获得小数
a的数据库调用次数。
我找不到一篇很好的MSDN文章。
你好,
实体框架是一个ORM Wrapper,除了它之外,它是一个非常普通的SQL客户端,因此每个建议都会计入EF。
但是,对于SQL语句,EF生成内部的是一个不同的点。 / p>
Does entity framework recommend to retrieve chunk of data at once or small queries at a time and get whole. which is more efficient? and which is recommended to use?
if we used lot of include so then it generates so many outer joins for generate the T-sql needed for database processing. that will be and advantage. but if we run small queries rather than get all chunk at once will call one db call so it will get small a number of database calls.
i couldn't found a good MSDN article regarding that.
Hello,
Entity Framework is a ORM Wrapper, beside this it is a quite normal SQL Client as every other one, so every suggestions count also for EF.
But what for SQL Statements EF generates internal is a different point.
这篇关于实体框架建议检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!