tags:

views:

961

answers:

4

Hi. I am hearing a lot of rumours that Linq2Sql is not going to be supported any more in the next version of .net. I like Linq2Sql a lot and find it very easy / lightweight to work with. I can understand some of the problems people have had with it (ppl used to nhibernate...) but used correctly I think most problems can be solved. I currently use it in all my projects now and I would hate to see that it isn't going to be supported any more.

So list the disadvantes you see with Linq2Sql

A: 

First and foremost, people are losing interest in it since it will not be developed any further, and Entity Framework will go forward instead.

LinqToSQl works and is pleasant to use, but EF will overtake it sooner or later.

The ORM purists would prefer if it was easier to set up LINQ to Sql to use an object model that is external to the LINQ to SQL data layer. This can be done in Linq to SQl, but it's a manual process that's far from the default configuration.

Anthony
+1  A: 

LINQ to SQL can certainly be fixed. But so long as the ADO.NET team is in charge of it, I seriously doubt it will be.

If it gets open sourced I think it will be a force to be reckoned with. But as it stands, it is a dying technology.

Jonathan Allen
+3  A: 

If there were another version of Linq to SQL, here's my feature wishlist:

Things I actually wanted whilst building my last Linq-to-SQL project (and had to work around manually in most cases)

  1. Many-many associations
  2. Better visual designer (including a "refresh table" feature)
  3. Control over cascade delete/update/SET NULL that doesn't involve hacking the XML
  4. Specific mappings for culture/string comparisons into SQL COLLATE statements (e.g. specifying whether passwords should be case sensitive or not, rather than relying on the default collation of the underlying database.)

Things I might want but haven't actually needed yet:

  1. Support for ordered collections (persisting lists to the DB so they are automatically retrieved in the same order they were persisted)
Dylan Beattie
I agree on point 2. On point 1 I see it as a nice to have feature as it is pretty easy to work around. I actually prefer to have a 1:1 mapping between the database my ORM schema. I have seen ppl abusing hibernate and created all sorts of exotic mappings and pretty much lost control over datatraffic
TT
Re. #2 - "refresh table" - I have written an add-in for that. You can download it and get a free 30-day trial license from http://www.huagati.com/dbmltools/
KristoferA - Huagati.com
A: 

Hi,

One of the biggest disadvantages I see in L2S is that it is a really hassle to use it in disconnected scenarios; send off a serialized version of an entity to another and try to "merge"/update it when you get it back and you will see it's shortcomings. If the .Attach() functionality had worked for such scenarioes, L2S would have been quite nice.

--larsw

larsw