开发者

Future of Linq to Sql and Entity Framework

I work on a project and want to use an ORM. What should I use: Linq to Sql or Entity Framework? Linq to Sql provides more opportunities, as I see, for example support for enumeration typ开发者_JAVA百科es. However, also it is said that, Linq to Sql was for playing and learning for Linq and future strategy of Microsoft lies on Entity Framework. So which one should I use?


As I understand it, support for LINQ to SQL isn't going anywhere, but most of the resources for ongoing development will be devoted to LINQ to Entities. I think you're safe going whichever direction looks like the better choice. If it's LINQ to SQL, go for it as long as it has everything you need- don't count on new features.


If you are deciding between those 2, and can use VS2010, definitely go with Entity Framework 4 now that is properly supports lazy loading, POCO objects, and code only models.


There's a stackoverflow post here that talks about the differences between the two.

What's interesting is that Zack Peterson's answer where he posted a link to article which posses the question "Is Linq to SQL truly dead?" Good fyi article.

But if you're after an ORM, have you looked at NHibernate or SubSonic? There are definately a few good non-MS ORMs out there.


Entity Framework is feature rich and being aggressively enhanced and promoted by Microsoft.

Linq To Sql is feature poor and not being promoted by Microsoft.

Linq To Sql does have some features that Entity Framework (v4) does not.

The risks of using Linq To Sql on a project are much higher than the risks of using EF v4, but you can choose either option.

As far as EF v1/v3.5, try to avoid it (but it's likely to be much easier to upgrade from EF 3.5 to EF 4 than from L2S to EF 4).


You should try PLINQO (http://www.plinqo.com). It's LINQ to SQL with a TON of improvements. Maybe someday EF will not suck. :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜