Entity Framework vs. LINQ to SQL
Offering two competing O/RM tools with different feature sets to .NET developers is difficult to justify
as an ongoing business strategy, and the DP ’ s team ’ s large - scale investment in and grandiose plans for
EF made orphaning of LINQ to SQL inevitable.
Tim Mallalieu, program manager for LINQ to SQL and Entity Framework, posted the “ Update on LINQ
to SQL and LINQ to Entities Roadmap ” article to the ADO.NET Team Blog on October 29, 2008
( http://blogs.msdn.com/adonet/archive/2008/10/29/update - on - linq - to - sql - and - linq -
to - entities - roadmap.aspx ). Following is the article ’ s last paragraph:
We ’ re making significant investments in the Entity Framework such that as of .NET 4.0 the
Entity Framework will be our recommended data access solution for LINQ to relational scenarios.
We are listening to customers regarding LINQ to SQL and will continue to evolve the product
based on feedback we receive from the community as well.
Most authors of data - intensive VS 2008 project examples — such as Scott Guthrie, corporate VP of the
.NET Developer Division — used LINQ to SQL as the preferred data source. Guthrie wrote a detailed,
nine - part LINQ to SQL tutorial targeted to ASP.NET and Web developers in 2007 ( http://weblogs
.asp.net/scottgu/archive/2007/09/07/linq - to - sql - part - 9 - using - a - custom - linq -
expression - with - the - lt - asp - linqdatasource - gt - control.aspx ). Sample ASP.NET Model -
View - Controller (MVC) and ASP.NET Dynamic Design projects used LINQ to SQL rather than EF as
their data source. This isn ’ t surprising when you consider that LINQ to SQL was a fully qualified
component of .NET 3.5 and EF didn ’ t arrive until .NET 3.5 and VS 2008 SP1.
Many developers had made significant investments in applying LINQ to SQL to new .NET 3.5 projects
before EF was released. Scott Hanselman, Microsoft ’ s principal program manager for community liaison,
released in October 2008 an “ Informal .NET Subsystem Survey ” that displayed the number of developers
using each of 14 .NET 3.5 and VS 2008 SP1 features ( http://www.hanselman.com/blog/
SurveyRESULTSWhatNETFrameworkFeaturesDoYouUse.aspx ). Of 4,899 respondents in a one - week period, 1,734 (35.5%) reported using LINQ to SQL versus 643 (13.1%) using EF. Use of LINQ to SQL was
almost neck - and - neck with ADO.NET DataSets at 1,887 users (38.5%).
Therefore, it ’ s not surprising that Mallalieu ’ s initial blog post engendered an outcry from the .NET
developer community. An extraordinary number of apocalyptic “ Death of LINQ to SQL ” or similarly
titled posts appeared on developer - oriented blogs. Rumors of LINQ to SQL ’ s death are premature,
because its assemblies are part of the .NET 3.5 [SP1] System.Data namespace and must be retained ad
infinitum for backward compatibility.
Mallalieu attempted to defend the DP group ’ s position in an October 31, 2008 “ Clarifying the message
on L2S Features ” post ( http://blogs.msdn.com/adonet/archive/2008/10/31/clarifying - the -
message - on - l2s - futures.aspx ) attempted to deflect the uproar by asking the rhetorical question,
“ Is LINQ dead? ” He then asserted that “ we decided to take the EF forward with regards to the overall
convergence effort and over time provide a single solution that can address the various asks ” and
confirmed EF ’ s status as the “ recommended data access solution for LINQ to relational scenarios. ”
The upshot of the DP group ’ s decision is that LINQ to SQL will enter the purgatory of deprecated
technologies upon the release of .NET 4.0 and VS 2010. Microsoft - supported improvements to LINQ to
SQL will be few and far between until then and non - existent thereafter. This means developers should
place bets on EF for data - intensive projects other than those for short - term, ad hoc individual or
departmental application.
The text formatting and the background make this blog impossible to read.
ReplyDeletemy apologize visitor , i have makes smaller text to better view to read , thanks !
Delete