Linq to SQL vs Entity Framework, Microsoft support

2019-05-10 16:34发布

What are the pros/cons of both? Also, I've heard various rumors concerning if Microsoft will continue to support LINQ to SQL, any further info on this would be appreciated.

4条回答
萌系小妹纸
2楼-- · 2019-05-10 16:49

This post points to some info. in particular 3 main differences:

  • The ability to query relational stores other than Microsoft SQL Server

  • A full textual query language not limited to LINQ's language support

  • Advanced mapping facilities, such as mapping a single class to multiple tables

查看更多
Anthone
3楼-- · 2019-05-10 16:57

Can you use NHibernate instead? It's very mature and has huge support from the community.

查看更多
等我变得足够好
4楼-- · 2019-05-10 16:58

L2S will continue to be supported from what I understand, from what I recall from the last PDC, all focus is being put on L2E for .NET 4.0.

From my experimenting with the current state of L2E, its 'less than adequate'. Especially in the speed area. I did some simple performance testing, and my L2S queries were sometimes 2-4x faster than L2E, and that is even with precompiling the L2E views.

查看更多
Lonely孤独者°
5楼-- · 2019-05-10 17:14

LINQ to SQL is for apps which will only use SQL, ever.

Entity Framework is for apps which need to provide a pluggable backend (Oracle, MySQL, SQL, XML, etc) datasource.

My philosophy on rumors is to use what makes sense for the project at hand that you consider stable and worry about "support" when you get official statements from MS (or any other company) positively or negatively to that effect. As of right now both are supported.

查看更多
登录 后发表回答