LINQ to SQL is NOT dead!
Ever since Microsoft announced that the Entity Framework was their ORM of choice, people everywhere have been saying, “LINQ to SQL is dead!” A lot of people feel like they’re not allowed to use LINQ to SQL anymore and that they have to use Entity Framework instead.
In fact, LINQ to SQL is not only alive and well, Microsoft has even announced LINQ to SQL improvements in .NET 4.0, including finally adding using ITable<T> for tables instead of Table<T>, which makes it much easier to test. Combine that with this open source tool that will create an IDataContext interface for you and you’re on your way to testable LINQ to SQL. So no, LINQ to SQL is not dead!!
Look, just because Microsoft says you should do something a certain way doesn’t mean that you have to do everything that they say. For example, Microsoft will almost never recommend using an open source software package over something that they’ve built (I say almost never because I’m sure they’ve done it at some point, but I’ve never seen it done). That certainly doesn’t mean that the Microsoft product is better than every open source tool.
For example, if you’re going to use an ORM, LINQ to SQL can get the job done for you, but if you’re looking for an ORM with more features, you owe it to yourself to check out Fluent NHibernate.
But from your point of view, why they are announcing that? they want to kill linq to sql? or what i can’t understand microsoft in this point
@amr,
I don’t think that MS thinks that LINQ to SQL sucks or anything like that, it’s just that they’ve chosen to promote Entity Framework and they’re not going to add big features (like many-to-many mapping table support) to LINQ to SQL. The problem is that EF v1 is (IMO) not as good as LINQ to SQL or NHibernate or most other ORMs and it’s not really a good choice at this point (haven’t seen enough of EF v2 yet to make a judgment on it).
Umm, they’re adding a few TINY improvements, and they’re leaving massive gaping holes in the implementation. When we say that Linq to SQL is dead, what we mean is that MS are not doing any significant development on it.
Sure, they’re fixing some of the more egregious issues, but they are deliberately crippling Linq to SQL in favour of that piece of crud EF.
Linq to SQL is dead. Deal with it. Move on.
Not on the next .NET version (requires v4!!!) which is impossible to set in production environment within a year (mono support, anyone?) but to another ORM mapper.
Thank God there are so many to choose from these days, Lightspeed is nice example (check David Hayden’s blog, lots of info why it beats the shit out of L2S).
Linq to Entities v4 looks promissing but they didn’t get it really right (many gotchas, check blogs…) and their idea of Domain Driven Design of dragging tables to a “DDD visualizer” and using POCOs is laughable…
when will they understand that in DDD you start with entities/value objects/specific types not your tables, argh…
Link-to-SQL is NOT Dead…it’s just slow. :P
Our Republic
I think my point here is that while MS would like to deprecate LINQ to SQL, I don’t feel like their replacement (Entity Framework) is as usable at this point. (Neither L2S or EF can touch Fluent NHibernate though.)
I hate LINQ to SQL and honestly it is limited and it sucks and no control over final SQL and it is slow as hell compared to SQLCommands especially if you convert output of LINQ to SQL to datatable. Bottom line it is utter crap.
I still prefer doing SQLCommands or Stored Procedures, only way to go. LINQ to SQL is made for people who suck at programming.