实体框架或MVC的LINQ? [英] Entity Framwork or LINQ for MVC ?

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

问题描述

我想学习Mvc。所以我只是谷歌基本注册表。我得到的结果更多与访问Sql服务器通过实体框架 LINQ到Sql 。所以我迷惑了哪一个是最好的,哪个是强大的。

两者的区别是什么?



指导我,

谢谢

解决方案

看看对这些非常相似的帖子的回应



http ://stackoverflow.com/questions/3293995/what-is-the-difference-between-entity-framework-and-linq-to-sql-by-net-4-0 [ ^ ]



http:// blogs.msdn.com/b/swiss_dpe_team/archive/2008/11/06/entity-framework-vs-linq-to-sql.aspx [ ^ ]



http://www.dofactory.com/topic/1077/when-to-use-linq-to-sql-versus-entity-framework.aspx [ ^ ]


这是一个广泛的主题,您可能希望谷歌某些相关文章或博客文章的主题。



这是一些帖子。 http://forums.asp.net/t/1700742 .aspx?+实体+框架+ Versus + Linq +到+ SQL +类+ [ ^ ]



表格形式的差异, http://www.dotnet-tricks.com /Tutorial/entityframework/1M5W300314-Difference-between-LINQ-to-SQL-and-Entity-Framework.html [ ^ ]



在Stack Overflow上, http://stackoverflow.com/questions/ 257016 / LINQ到SQL-VS-实体 - 框架性能 [ ^ ]



最佳方法



但是a更好的想法是始终自己测试代码。您可以使用.NET框架的Stopwatch类,( http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch(v=vs.110).aspx [ ^ ])然后运行两个代码,运行EF和还有用于获取数据的LINQ代码。



以100次循环运行它们,计算它们的时间。花费更少时间的代码将更好。 : - )


我个人会继续使用Entity Framework。最近对Linq to SQL进行了很多改进和支持,这通常是微软未能继续投入并在该技术或产品上投入大量资金的一个迹象。



说完这篇文章后说:



http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql [ ^ ]

I would like to Learn Mvc. so i just Google basic Registration Form .i got Result More Related to Accessing Sql server Through Entity Framework and LINQ to Sql .so i got Confused which one is Best and Which is powerful .
what is the Difference Of Both ?

Guid me,
Thanks

解决方案

Have a look at the reponses to these very similar posts

http://stackoverflow.com/questions/3293995/what-is-the-difference-between-entity-framework-and-linq-to-sql-by-net-4-0[^]

http://blogs.msdn.com/b/swiss_dpe_team/archive/2008/11/06/entity-framework-vs-linq-to-sql.aspx[^]

http://www.dofactory.com/topic/1077/when-to-use-linq-to-sql-versus-entity-framework.aspx[^]


This is a broad topic and you might want to Google the topic for some related articles or blog posts.

Here are a few posts. http://forums.asp.net/t/1700742.aspx?+Entity+framework+Versus+Linq+to+SQL+classes+[^]

Tabular form of difference, http://www.dotnet-tricks.com/Tutorial/entityframework/1M5W300314-Difference-between-LINQ-to-SQL-and-Entity-Framework.html[^]

On Stack Overflow, http://stackoverflow.com/questions/257016/linq-to-sql-vs-entity-framework-performance[^]

Best Method

But a better idea is to always test the code yourself. You can use the Stopwatch class of the .NET framework, (http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch(v=vs.110).aspx[^]) and then run both codes, run the EF and also the LINQ code to get the data.

Run them with a loop of 100 times, calculate their time. The code that takes less time will be better one. :-)


I personally would go ahead with Entity Framework. There has been much improvement and support for Linq to SQL recently and that is usually one of the sign that Microsoft is not going ahead and investing much in that technology or product.

Having said that look at this article as well:

http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql[^]


这篇关于实体框架或MVC的LINQ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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