实体框架4.0与应用程序数据块 [英] Entity Framework 4.0 vs Application Data block

查看:133
本文介绍了实体框架4.0与应用程序数据块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Entity Framework 4.0有哪些优点和缺点。什么是我们应该使用EF 4.0的最佳方案和情况。包括Martin Fowler在内的许多专家都讨厌ORM,你对此有何看法?



您是否更喜欢使用Microsoft企业数据块而不是EF 4.0?设计应用程序时会有很多歧义,并在编写DAL(数据访问层)时决定使用什么。

What are the advantages and disadvantages of Entity Framework 4.0. What are best scenarios and cases where we should use EF 4.0. Many Experts including Martin Fowler hates ORM , what's your say on this ?

Do you prefer using Microsoft Enterprise Data Block over EF 4.0 ? There is lot of ambiguity while design your application and decide what to use while writing your DAL (data Access layer).

推荐答案

实体框架正在发展。所以,我真的不喜欢实体框架4 ...当有Entitty Framework 6.如果一个人讨厌ORM,他/她有一个主观态度,这是任何客观问题。有更好和更好的ORM实现,但讨厌它们......为什么?



但是,如果你正在评估项目的设计考虑因素,你需要考虑客观方面。 DAAB和EF之间的一个主要区别是数据的方法。 EF(和一般的ORM)使模型强类型,从而使它成为你的OO代码的一部分 - 你有Linq! DAAB正在使用传统方法。因此,如果您希望在整个生命周期中使用简洁的代码,请选择EF。如果您需要性能,并且希望对执行的SQL代码进行低级别控制,请选择延迟工具和DAAB。性能差异还不是很大......



考虑阅读这个性能比较: http://serena-yeoh.blogspot.hu/2014/02/entity-framework-vs-el-daab-performance.html [ ^ ]但也是这样: http:/ /serena-yeoh.blogspot.hu/2014/02/entity-framework-6-vs-el6-daab.html [ ^ ]
Entity framework is evolving. So, I really don't prefere Entity Framework 4... when there is Entitty Framework 6. If one hates ORM, than he/she has a subjective attitude, which is out of any objective question. There are better and less good ORM implementations, but hating them... why?

Still, if you are assessing the design considerations of your project, you need to consider objective aspects. One major difference between DAAB and EF is the approach to the data. EF (and ORMs in general) makes model strongly typed thus makes it part of your OO code - and you have Linq! DAAB is using a legacy approach. So if you want to have a neat code less work during the whole lifecycle, choose EF. If you need performance, and you want a low level control over the executed SQL code, choose lagacy tools and DAAB. Still the difference in performance is not that much...

Consider reading this performance comparison: http://serena-yeoh.blogspot.hu/2014/02/entity-framework-vs-el-daab-performance.html[^] but this too: http://serena-yeoh.blogspot.hu/2014/02/entity-framework-6-vs-el6-daab.html[^]


这篇关于实体框架4.0与应用程序数据块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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