tags:

views:

71

answers:

4

has linq to sql has any major and known flaw?

A: 

The only shortcoming I see is the fact that there is no built-in support for Many-to-Many relationships.

Other than that, and the necessity to tweak certain LINQ to SQL queries for better SQL performance, no.

Justin Niessner
entity framework has Many-to-Many built in support?
mazhar kaunain baig
+1  A: 

We've built our next generation software platform on L2S, and we're a $2.5B solar company. We've found it to be fairly easy to use, and performance has been very acceptable. No major shortcomings for us. Granted, there is no M2M support, but that hasn't been a huge issue for us. We wrote our own code generator that generates our own application level entities as well as our own custom L2S entities that has M2M support built in. We've very satisfied so far.

Randy Minder
+1  A: 

"Flaws?" No, not really.

Shortcomings? Perhaps:

  • No support for Table-Valued Parameters;
  • No support for many-to-many relationships;
  • No support for CLR User-Defined Types;
  • Spotty support for N-Tier scenarios (disconnected entities);
  • Only works with SQL Server (no support for mysql, Oracle, etc.)

Of course, most people aren't affected by any of these, and some of these issues tend to affect all ORM tools.

Linq to SQL is a perfectly solid library. If it meets your requirements then there's no reason not to use it.

Aaronaught
Devart has a LinqConnect (http://www.devart.com/news/2010/linqconnect100b.html) which will allow Linq-to-SQL to talk to other backends....
marc_s
@marc: Pretty cool! Looks like it's still in beta, but definitely going in my bookmarks.
Aaronaught
A: 

I blogged about some of the issues I ran into with LinqToSql a while back:

The drawbacks of adopting Linq To Sql

That is not a comprehensive list and I've run across additional issues since then. I haven't yet taken the time to write them up however.

Michael Maddox