Chapter 2. Getting Started

Many developers prefer to use a new technology rather than simply read about it. Practical experience provides a foundation on which to construct the theoretical understanding needed when mastering a new skill.

This chapter helps you understand LINQ by showing several simple programs that illustrate

• LINQ to Objects

• LINQ to SQL

• LINQ to XML

These examples demonstrate three themes that recur frequently in this book:

• The usefulness of query expressions

• The significance of deferred execution

• The primacy of IEnumerable<T>

The examples shown in this chapter also illustrate how to write query expressions, the key syntactic construct used by LINQ developers to query a data source. When executing even these simple ...

Get Essential LINQ 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.