Today, programming queries with different data is very different depending on the data source. The syntax to filter and search objects is completely different from the syntax to access the database or XML. Language Integrated Query (LINQ) integrates query syntax inside the C# programming language and makes it possible to access different data sources with the same syntax. LINQ offers an abstraction to different data sources so you can get the same syntax.
This chapter gives you a glimpse at LINQ and the language extensions for C# 3.0 that make the new features possible. The topics of this chapter are:
Traditional queries across objects, the database and XML
LINQ queries across objects, the database and XML
Query expressions
Extension methods
Standard query operators
Lambda expressions
Deferred query execution
Expression trees
Type inference
Object and collection initializers
Anonymous types
Tip | This chapter is based on a prerelease version of these extensions that might change before the release, but it will give you an idea of where the language is going. |