What's the difference between LINQ to SQL and ADO.net ?
LINQ to SQL was the first object-relational mapping technology released by Microsoft. It works well in basic scenarios and continues to be supported in Visual Studio, but it's no longer under active development.
More importantly: when it comes to querying databases, LINQ is in most cases a significantly more productive querying language than SQL. Compared to SQL, LINQ is simpler, tidier, and higher-level.
LINQ to ADO.NET enables you to query over any enumerable object in ADO.NET by using the Language-Integrated Query (LINQ) programming model.
LINQ to SQL allow you to query and modify SQL Server database by using LINQ syntax. Entity framework is a great ORM shipped by Microsoft which allow you to query and modify RDBMS like SQL Server, Oracle, DB2 and MySQL etc. by using LINQ syntax. Today, EF is widely used by each and every .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With