13.1. LINQ Specific Programming Constructs

From a very high level, LINQ can be understood as a strongly typed query language, embedded directly into the grammar of C# itself. Using LINQ, you can build any number of expressions which have a look-and-feel similar to that of a database SQL query. However, a LINQ query can be applied to any number of data stores, including stores that have nothing to do with a literal relational database.

NOTE

Although LINQ queries look similar to SQL queries, the syntax is not identical. In fact, many LINQ queries seem to be the exact opposite format of a similar database query! If you attempt to map LINQ directly to SQL, you will surely become frustrated. To keep your sanity, I'd recommend that you try your best ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition 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.