Best Decision to Kill LINQ to SQL

I fully agree with Tim Mallalieu to recommend LINQ to Entities as the data access solution for your application. Sure, for an object-oriented view of the database LINQ to SQL was somewhat useful but in essence this is a scenario that the Entity Framework supports as well. Yes, in some ways the Entity Framework does add a bit of complexity but then again creating a direct mapping with the Entity Framework isn't much more difficult then it would be with LINQ to SQL. Apart from the fact that Microsoft shouldn't have released LINQ to SQL as a product I was quit surprised about the wave of people adopting this piece of technology. A tool for direct mappings misused as an object-relational mapper felt awkward from the start. I hoped for a little while that LINQ to SQL would evolve in a fully fledged object-relational mapper, but the Entity Framework with it's EDM investment had more potential from the start.

We've spend a good amount of time talking with Tim (@PDC) on the future of the Entity Framework. The team is working hard on better POCO and TDD support and to deliver stories that support Domain-Driven Design over the next two releases. Most scenarios Alex and I explained to Tim have been thought through thoroughly and despite certain design choice which are arguable seen in isolation make perfect sense in a broader scope and the vision for the Entity Framework platform.

I'm looking forward to V2 and V3 with input from the dp advisory council... and can't wait to taste mEntity. To bad since I was looking forward to another technology deathmatch with Alex.


  • Peter, I can't say I disagree with you while trying to look at it from your perspective. Good thing is that L2S isn't completely being abandoned. It still makes sense for the RAD use cases and provides a nice object-oriented view of the database. I disagree its architecture would be suitable for advanced mapping scenarios and I argue that the current bits would suit the Olso initiative.

    I hope MS will publish additional information on how they plan to move the EF forward in a direction that also appeals to current L2S users.

  • I think they can co-exist. I think a lot of people are still using datasets and the migration to LINQ-to-SQL is pretty easy. Not thinking about entities, etc. just fetching data from the database.

    Hundreds of products are being developed the "easy way" (datasets, drag & drop, RAD, etc) and they also work. Maybe not as maintainable, maybe not architecturally correct to most, but they work and they even have happy customers!

    Maybe Microsoft didn't position L2S correctly. Maybe with EF they do, or at least try to. But L2S has its good things as well and it's easy to use for a lot of people.

    I think it'd be a shame if they stopped development on L2S completely.

  • Agreed with Peter.All the efforts of learning it now seemed doomed.

  • I think it's good to challenge MS in a way that's beneficial for customers. No reasons for holy wars on my end. I like both technologies although I must say L2S has a somewhat limited feature set (in terms of mappings) for the domain in which I do most of my work. The next version of the EF will come with the .NET 4.0 bits somewhere next year. Anyway, I'm glad that they pulled the rabbit out of the hat sooner then later.

  • You expect .NET 4.0 next year? Isn't it released with 2010?

  • Why doesn't anyone listen to Frans? :)

    He's like a broken record.

    A broken record that is usually right on the money... ;)

    Would it really hurt Microsoft to develop both L2S and the EF at the same time? They have the money. Why not give us alternatives? They have ASP.NET web forms and ASP.NET MVC. Heck, rename L2S to EF:Lite if you want to. I've run the L2S assembly through Reflector and I'm almost positive it wouldn't be that difficult to add in support for other database 'providers'.

    Meanwhile Microsoft will play ORM catchup. There are plenty of existing tools out there. Nhibernate for example.

    Oh well... sort of disappointing to see L2S go. :(

  • Eric, there's lots of reasons why L2S is discontinued, but overriding ones were business reasons rather than technical. Matt Warren states that it's trivial for them to implement support for other providers, but that the MS marketing team decided they should lock it down to SQL Server.

    Problem is that as far as I've looked into the EF, it's fundamentally different from L2S and allows much greater flexibility and versatility regarding complex O/R mapping etc. The two are just not compatible and there's no real reason to continue to support a tool that does half the job and another that does the full job.

    It's all well and good to say L2S is fine for my application today because my app only needs 1:1 table to class mapping. But how about tomorrow, when you need to do a refactoring on your database or use ADO.NET Data Services, reporting, OSLO or other EDM consumers, or maybe a use case arises where you would actually want to introduce a more complicated mapping, perhaps a multi-table to class denormalization or filtered conditional mapping, or TPT inheritance hierarchy, or effective dated lookup etc. In L2S you've suddenly hit a brick wall.

  • A thousand-li journey is started by taking the first step.


  • -----------------------------------------------------------
    "I completely agree with the over viewpoint, the globe wide internet is certainly without a doubt growing in on the principal kind of conversation round the planet and it is because of to internet websites like this that ideas are spreading so swiftly."

  • -----------------------------------------------------------
    "As a Newbie, I am constantly exploring on-line for articles or blog posts that may aid me. Say thanks to you"

  • Your writing is good and gives food for thought. I hope that I'll have far more time to go by way of your content. Regards. I wish that you basically publish new texts and invite you to greet me.

Comments have been disabled for this content.