Reputation: 13909
What major features are missing from Linq-to-Sql?
I have already developed a major project with Linq-to-Sql at it's DAL Heart. i hadn't developed using a relational data mapper before, so it was a learning curve coming from datasets. But i didn't find any major problems which couldn't be solved with Linq-to-Sql. My testing concluded that it was significantly faster than Linq-to-Entities.
So what major features are missing from Linq-to-Sql?
I guess what i am trying to ask is if development on Linq-to-Sql is ceased - will it matter?
Upvotes: 3
Views: 1639
Reputation: 832
Linq to SQL has no easy support for multi-tier architectures.
The Entity Framework was designed from the start to support distributed scenarios. While in .Net 3.5 EF wasn't completely there (at least in an automatic way), it laid the ground for further improvements. So, in .Net 4.0 the EF adds T4 templates to code-gen Self-Tracking entities and DTOs.
Upvotes: 2
Reputation:
I don't think it's dead. I think it will be worked on and the current issues will probably disappear. But i don't think it's going to be anything more than what it is now. Does it matter? I personally don't think it does. I think the framework is good as it is. The 2 major issue i found with L2S was the inability to easily detach entities and the awkward update mechanism.
Upvotes: 1
Reputation: 12397
First of all, it isn't dead. Although it is not getting any new features in 4.0, they have fixed a bunch of bugs and quirks and I'm sure they will continue to do so.
Check out the Linq-to-SQL change list for .net 4.0:
http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40
IMO it may be a good thing that they're not touching too much of the core - it is solid, efficient and generates really good SQL in most cases so any major surgery would just risk breaking some of the goodies. The few missing bits in both the designer and runtime can be bolted on or worked around.
Also, Matt Warren, the guy who originally wrote L2S at MSFT has written a "version 2" that he has published as open-source (MS-PL) on his blog and on codeplex.com. He calls it the IQToolkit but I would like to refer to it as L2Sv2... :)
Check it out at:
http://blogs.msdn.com/mattwar/
http://www.codeplex.com/IQToolkit/
Upvotes: 2
Reputation: 1671
I've been using linq to sql heavily for months. The only nit I've found is that adding a predicate onto a mix of stored procedure and programmatically generated results will try to push the query down to SQL, before the programmatic results have been calculated. This is easily fixed by calling .ToList() first.
Every once in a while I wish for a Linq to Entity feature, but linq to sql accomplishes 95% of what I want.
Upvotes: 1
Reputation: 5368
Upvotes: 3
Reputation:
I have been developing a system using it recently. My co-worker who designed the DB it hooks into has done some of the L2S coding for it as well. The two things he whinged (incessantly) about were:
1/ No baked in way to do bulk deletes based on some condition. L2S will end up deleting the rows individually which is highly inefficient. There are a number of blogs discussing various work-arounds for this.
2/ Updates require the cumbersome mechanic of querying for an object, updating it and then committing the changes, i.e. the initial query shouldn't be necessary. If you know the key for a row you should be able to just update it directly without a prior query.
Upvotes: 1
Reputation: 18815
Maybe the biggest thing missing is a future
I tend to agree with this post I linked to, MS say that there will be ongoing development on Linq to SQL, but their actions (or more specifically non-actions) tell a different story. MS certainly want you to bet on Linq to Entities instead.
Upvotes: 3
Reputation: 3647
unless microsoft can make entity framework better than linq to sql for both speed and simplicity it doesn't matter IMHO.
Upvotes: 0