Murach's ADO.NET 3.5, LINQ,
and the Entity Framework with C# 2008

An introduction to LINQ

In this chapter, you'll learn the basic skills for using LINQ, a feature introduced in .NET 3.5. LINQ provides a way for you to query a data source using constructs that are built into the C# language. That way, you can use the same language to work with a variety of data structures, from datasets to databases to XML documents.

To see how well this book works, you can download this chapter and try it out for yourself.

Chapter 11 An introduction to LINQ
Basic concepts for working with LINQ 350
How LINQ is implemented 350
Advantages of using LINQ 350
C# 2008 features that support LINQ 352
LINQ providers included with C# 2008 352
The three stages of a query operation 354
How to code query expressions 356
How to identify the data source for a query 356
How to filter the results of a query 358
How to sort the results of a query 360
How to select fields from a query 362
How to assign an alias to the result of a calculation 364
How to join data from two or more data sources 366
How to group query results 368
How to use extension methods and lambda expressions 370
How extension methods work 370
Extension methods used to implement LINQ functionality 370
How lambda expressions work 372
How to use lambda expressions with extension methods 372
How to use extension methods that implement aggregate functions 374
A Vendors Balances application that uses LINQ 376
The user interface for the application 376
The classes used by the application 376
The code for the form 378




Murach's ADO.NET 3.5 with C# 2008

Learn more about this book

View the table of contents


More about the eBook



Our 100% Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a prompt refund...no questions asked.