Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINQ to SQL vs ADO.Net

What's the difference between LINQ to SQL and ADO.net ?

like image 925
Csharp Avatar asked Mar 22 '09 15:03

Csharp


People also ask

Is LINQ to SQL still used?

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.

Which is faster LINQ or SQL?

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.

Does ADO.NET use LINQ?

LINQ to ADO.NET enables you to query over any enumerable object in ADO.NET by using the Language-Integrated Query (LINQ) programming model.

Which is better Entity Framework or LINQ to SQL?

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 .


2 Answers

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.

like image 164
mmx Avatar answered Oct 15 '22 00:10

mmx


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.

like image 45
dkretz Avatar answered Oct 15 '22 02:10

dkretz