LINQ in Action - LINQ Book & News

Why LINQ will succeed

In the official Linq forum, Joe Albahari presents the reasons why he thinks Linq will succeed:
  1. LINQ syntax beats SQL syntax. SQL is flawed in that queries become exponentially difficult to write as their complexity grows. LINQ scales much better in this regard. Once you get used to it, it's hard to go back.
  2. Database queries are easily composable. You can conditionally add an ORDER BY or WHERE predicate without discovering at run-time that a certain string combination generates a syntax error.
  3. More bugs are picked up at compile-time.
  4. Parameterization is automatic and type-safe.
  5. LINQ queries can directly populate an object hierarchy.
  6. LINQ to SQL provides a model for provider independence that might really work.
  7. LINQ significantly cuts plumbing code and clutter. Without sweeping stuff under the carpet, like Workflow or Datasets. This is a credit to the design team.
  8. C# hasn't suffered in the process (in fact, it's gained).
There are some bugs in the PDC – also some obstacles to implementing MetaModel and IDbContext without reverse engineering, but nothing unfixable. Looking forward to the release!
I agree. Great summary.
Published Friday, July 28, 2006 4:51 PM by Fabrice Marguerie

Comments

 

Kasper said:

I have written a small project about LINQ and DLinq. This might an interesting read for some of you guys.

http://www.dlinq.dk/DLinq.html
August 27, 2006 6:13 AM
 

paburgos said:

with Linq can we discard stored procedures forever? is it another reason to use Linq?

November 17, 2006 5:29 AM
 

paburgos said:

NHibernate vs Linq? who wins?

November 17, 2006 5:35 AM
 

Fabrice said:

> with Linq can we discard stored procedures forever?

LINQ to SQL can be used with stored procedures if required, but most of the time you should let it generate SQL for you as it's the way it's designed.

This doesn't mean that it's a way to "discard" stored procedures. Without LINQ to SQL, you are already free to choose between dynamic SQL and stored procedures.

November 20, 2006 5:54 AM
 

Paul said:

But will it be faster than a stored procedure?  Don't think so...  Might be stuck with stored procedures to have better performance and using LINQ to Stored Procedures adds another layer of complexity...

September 10, 2009 2:30 PM
 

Fabrice Marguerie said:

Paul, what makes you believe that it won't be faster than a stored procedure?

In fact, tests have shown that the difference in speed between dynamically generated SQL (as is the case with LINQ to SQL, ADO.NET Entity Framework, and the likes) and stored procedures is negligible in most cases. In cases, dynamic SQL is even faster than stored procs.

See this for example: http://www.blackwasp.co.uk/SpeedTestSqlSproc.aspx

September 10, 2009 2:45 PM
New Comments to this post are disabled