MVC中的Ado.net或实体框架5.哪一个更好? [英] Ado.net or entity framework in MVC 5. Which one better ?

查看:79
本文介绍了MVC中的Ado.net或实体框架5.哪一个更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之前我正在使用ADO.Net Web应用程序开发Asp.Net(C#),现在我想继续使用MVC 5.我是MVC的新手。



我想知道哪一个在MVC 5,ADO.Net或实体框架中更好?



我尝试了什么:



我没有使用MVC架构执行任何项目。

解决方案

其中更好:快艇还是法拉利? *



如果不了解项目的复杂细节,或团队的经验,能力和偏好,我们无法告诉您哪个技术更好。



它们都非常好,并且在ASP.NET MVC中都非常有用。使用EF比使用原始ADO.NET更容易看到更多示例,但EF有一些缺点和局限性。 ADO.NET在过去的15年中一直相当稳定,而EF在其生命周期中经历了几次重大转变。



还有其他ORM需要考虑,例如如 NHibernate [ ^ ];或者你可能想要像 Dapper [ ^ ]。





* 答案是a hovercraft。但最好不要一个充满鳗鱼的人。 :)

Previous I was working on the Asp.Net(C#) with the ADO.Net Web Application, Now i want move on MVC 5. I am totally new in the MVC.

I want to know which one is better in MVC 5, that ADO.Net or Entity Framework ?

What I have tried:

I have not perform any project with the use of MVC architecture.

解决方案

Which is better: a speedboat, or a Ferrari? *

Without knowing the intricate details of your project, or your team's experience, capabilities and preferences, there's no way we can tell you which technology is "better".

They're both pretty good, and both perfectly usable in ASP.NET MVC. You'll tend to see more examples using EF than raw ADO.NET, but EF has some drawbacks and limitations. ADO.NET has been pretty stable for the last 15 years, whereas EF has gone through several major shifts in its lifetime.

There are also other ORMs to consider, such as NHibernate[^]; or you might want a "micro-ORM" like Dapper[^].


* And the answer is "a hovercraft". But preferably not one that's full of eels. :)


这篇关于MVC中的Ado.net或实体框架5.哪一个更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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