Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are there any benefits of using LINQ to SQL?
Message
De
22/12/2009 07:35:05
 
 
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01440083
Message ID:
01440127
Vues:
85
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm learning LINQ right now and in the LINQ to SQL example I see that the generated SQL is not really optimized (I would write it myself differently).

Couple of things to bear in mind:
(a) The generated SQL may look overly verbose - but this does not neccessarily mean there will be a negative impact on performance.
(b) Sometimes you can change the Linq query in a subtle way that will give the same result but a better SQL execution
(c) and, sometimes, you're right the SQL is not optimum....... :-{

As Craig pointed out it's Entity Framework that getting the bulk of MS effort now - if you're just starting then go with that (no experience with NHibernate so can't comment on Mike's suggestion). Using EF at a basic level is no more complex then LinqToSql.

>I'm wondering if you can tell me if there are advantages of using LINQ to SQL and elaborate on this topic in general.
>I see the simplicity of quering XML data with LINQ to XML or other type of data.

The big advantage is obviously being able to work immediately with objects/classes rather than datasets/datatables/datareaders etc....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform