views:

472

answers:

4

When will linq to sql be phased out? Is entity frameworks (replacement) released yet?

+4  A: 

Entity frameworks is released. LinqToSql will be updated for .Net 4 and is not going away any time soon.

ScottS
+9  A: 

Yes, the ADO.NET Entity Framework has been released with .NET 3.5 Service Pack 1.

And no, Entity Framework will not replace LINQ-2-SQL per se - the two have quite different target audiences and have their own, respective target markets.

LINQ-2-SQL is great for simpler scenarios where your business objects are pretty much a 1:1 mapping of your database tables. This is often the case, and in such a scenario, EF is an overkill.

EF on the other hand is great in an enterprise level app where your business domain objects will not necessarily map 1:1 onto tables, or where you need to support multiple database backends beyond MS SQL Server.

Even with .NET 4.0, Microsoft is still making investments in LINQ-2-SQL - see Damien Guard's blog post to that effect.

Marc

marc_s
+1  A: 

According to the ADO.NET team late last year, .NET 4.0 will be the official point where they are recommending phasing out LINQ to SQL in favor of the Entity Framework.

From this blog:

"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."

Reed Copsey
+2  A: 

Linq-to-SQL is the high-performance SQL-server-based option. It is part of the .net framework and will not go away. Do not pay too much attention to what comes out of the mouth of RDs who are trying to sell their own home-grown ORMs, or MSFT marketing...

EF offers more abstraction and supports more backend databases than L2S, with the tradeoff of [much] less efficient SQL queries. Although Microsoft marketing have their own story to it, my personal take is: if you're targeting SQL Server[, want to use a MSFT OR mapper,] and you want scalability and performance - L2S is the technology to go for. If on the other hand performance and scalability is not important but you have a crew of inexperienced developers who need everything served on a plate, [and the person serving that plate is good at hand-cranking SSDL and CSDL in a XML editor] EF is a good contender. JMHO.

KristoferA - Huagati.com