What is LINQ to SQL?

LINQ to SQL enables you to access and modify data from a Microsoft SQL Server database without writing any SQL. LINQ to SQL enables you to perform all of your database queries from directly within the C# or VB.NET programming languages.

LINQ to SQL provides a number of benefits:

  • Productivity — A huge amount of developer time is wasted writing components that bridge the gap between the relational (database) and object (C# or VB.NET) worlds. LINQ to SQL eliminates all of this work.
  • Intellisense — Since LINQ to SQL is integrated into both the C# and VB.NET languages, you get full Intellisense within Visual Studio when writing LINQ to SQL queries.
  • Maintainability — LINQ to SQL enables you to maintain all of your code in one place: your application. You no longer need to write stored procedures when taking advantage of LINQ to SQL.

After I learned LINQ to SQL, I stopped writing any SQL. I build all of my applications using LINQ to SQL in my data access layer. Forget everything you know about ADO.NET and SQL, learn LINQ to SQL instead!