Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Query Expression Syntax

In our example-driven exploration of LINQ, we’ve seen many query expressions. Now the time has come to take a closer look at the “syntactical surface area” for writing query expressions, as introduced in C# 3.0. During our discussion of query expressions throughout this section, we’ll see examples for the various query constructs available. But first let’s explain the role query expressions play in the bigger picture of LINQ.

Why Query Expressions?

LINQ is the concatenation of LIN and Q. Trivial as this might seem, it’s quite important to understand those are the two core pieces of the puzzle being presented here. The latter part is clear: We want provide a way to query data across different domains such as in-memory, relational, and hierarchical, but also more. This mission can be separated from the former part, which has to do with language integration to allow more natural ways to express queries.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint