LINQ to SQL

LINQ to SQL is used to access relational databases. A goal of LINQ to SQL is to offer a unified query expression language for relational databases regardless of the data source. You learn a single syntax that can be applied to a variety of native databases. The query expression is converted by the provider into a query string targeting a specific database, and the query string is submitted to the relevant database engine. You can retrieve the SQL-specific query string generated for a query expression with the DataContext.GetCommand method. To submit a SQL command directly to the database engine, use DataContext.ExecuteQuery. LINQ to SQL queries are not immediate and use deferred loading. This is accomplished via expression trees, which ...

Get Programming Microsoft® Visual C#® 2008: The Language 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.