Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Linq
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Re: Linq
Divers
Thread ID:
01246058
Message ID:
01246333
Vues:
35
Linq to Sql engine is smart enough to generate the folowing SQL query in order to send if to SQL Server:

Hi, Fabio,

That's going to be true for relatively simple queries, but not so for more complicated ones. For instance, if you write a LINQ query to retrieve muliple calculated aggregations from the same parent table, LINQ generates some pretty inefficient SQL code (I've even seen it generate multiple correlated subqueries for the same parent table).

Somewhere in a prior post, someone stated that since this is "new" technology, it's going to feel like a step backwards. I see it differently - SQL Analysis Services and Reporting Services contain builders to create MDX queries that aren't what I would call efficient. "Builders" in general are functional but not necessarily the most efficient. I think the best way to get the most efficient SQL is to write SQL. ;)

There is general consensus that those using stored procs for database access have limited/little interest in LINQ to SQL.

On the other hand, I really like Linq to XML, Linq to DataSets (for strongly-typed datasets), and Linq to Objects - those, along with the new language features like lambdas and object initializers, are the cool new features, IMO.

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform