Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 types. 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?

like image 347
erasmus Avatar asked Mar 08 '10 23:03

erasmus


3 Answers

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.

like image 187
Dave Swersky Avatar answered Sep 25 '22 02:09

Dave Swersky


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.

like image 33
bkaid Avatar answered Sep 23 '22 02:09

bkaid


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.

like image 44
Noel Avatar answered Sep 23 '22 02:09

Noel