LINQ to SQL vs ADO.Net
Also, not really sure if I am right here. But ADO.NET is allways working 'offline' with your data. I think LINQ2SQL is working online with your data.
You need to start with the understanding that LINQ is Microsoft's intended paradigm for querying all sorts of structured data declaratively with one tool - think "One Ring To Rule Them All". LINQ to SQL is just the first manifestation, implemented to query relational databases.
In fact, Microsoft has a mixed message about LINQ's relationship with SQL. I think the problem is that it has become understood as a substitute for other abstraction strategies, and it is now often seen as a way for programmers to avoid the need to become skilled at SQL.
ADO.Net treats OOP as what it is, and relational data as what it is, and expects you to do each properly on its own terms.
The advantages and disadvantages of the two are open to debate. But if you agree that Microsoft's Computer Science wizards have come up with something of an uber-abstraction for structured data querying, then you'll probably want to move in this direction. There is some indication that other software product providers are willing to play along, so it may not even end up being totally proprietary, which would be a good thing.
ADO.NET is the underlying data access API for .NET Framework (much like JDBC in Java). It's been around since the first release of .NET.
LINQ to SQL is a data access framework built on ADO.NET and new language features that makes SQL Server data available natively in the object oriented style of programming.
There is a fairly large set of differences between these two technologies that cannot be really covered in a short SO post, but I'll try to cover the highlights
- In Linq2Sql you write your queries over in memory objects. Under the hood though the code you write is translated to expression trees and is further translated to SQL at runtime where the query is actually run. In ADO.Net you directly build SQL queries which are run against the server.
- Linq2Sql has direct language support in C# and VB.Net. ADO.Net provides support for string based query which have 0 language support other than just a raw string.
- The language support in Linq2Sql makes queries type safe. In ADO.Net all query results must be converted to the appropriate type which essentially removes type safety checks.