Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are there any benefits of using LINQ to SQL?
Message
From
22/12/2009 07:35:05
 
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01440083
Message ID:
01440127
Views:
86
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....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform