Developing with LINQ to SQL

LINQ enables developers to write code in either C# or VB.NET using the same set of syntactic conventions to query object collections (known as LINQ to Objects), XML documents (known as LINQ to XML), SQL Server data (known as LINQ to SQL), and other queryable resources. The focus in the following sections is exclusively on LINQ to SQL.

A LINQ to SQL statement is translated into an in-memory data structure known as an expression tree. An expression tree is an abstract representation of executable code. These trees provide a means for translating LINQ expressions into something else—in the case of LINQ to SQL, T-SQL statements. Once translated into T-SQL, the code is executed on SQL Server (not in .NET). This point is ...

Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.