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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With