Home > Store > Programming > .NET and Windows Programming
LINQ Unleashed: for C#
- By Paul Kimmel
- Published Aug 19, 2008 by Sams. Part of the Unleashed series.
- Copyright 2009
- Dimensions: 7 X 9-1/8
- Pages: 552
- Edition: 1st
- Book
- ISBN-10: 0-672-32983-2
- ISBN-13: 978-0-672-32983-8
- eBook
- ISBN-10: 0-7686-8536-2
- ISBN-13: 978-0-7686-8536-7
Register your product to gain access to bonus material or receive a coupon.
Foreword by Darryl Hogan, Architect Evangelist, Microsoft Corporation
Microsoft’s highly anticipated LINQ query technology makes it easy to retrieve any information programmatically from any data source, no matter where it comes from or how it’s stored. Using LINQ, developers can query objects, relational databases, XML documents, and ADO.NET datasets--and do it all directly from C# 3.0, leveraging the powerful capabilities of LINQ.
This is a definitive guide to getting real-world results with LINQ, using C# 3.0 and Visual Studio 2008. In LINQ Unleashed, Microsoft MVP Paul Kimmel covers every facet of LINQ programming, showing how LINQ can help you dramatically improve your productivity and build more reliable, maintainable applications.
Kimmel begins by reviewing the state-of-the-art C# programming techniques LINQ uses, including anonymous types, partial methods, and Lambda expressions. Next, using realistic examples and easy-to-adapt sample code, he details the most powerful new LINQ techniques for accessing objects, databases, and XML. You’ll gain a deep and practical understanding of how LINQ works “under the hood”--and learn how to do everything from selecting data through integrating XML with other data models.
- Build efficient LINQ queries to .NET objects, SQL databases, and XML content
- Utilize anonymous types to reduce design time, coding effort, and debugging time
- Automatically generate .NET state machines with the new yield return construct
- Master LINQ query syntax, operators, extension methods, sorting, grouping, aggregate and set operations, and more
- Make the most of select--and use it in the business layer of your n-tier applications
- Query relational data stored in Microsoft SQL Server
- Use nullable types to eliminate unnecessary database access plumbing code
- Use LINQ with ADO.NET 3.0 and Microsoft’s powerful new Entity Framework
- Extract XML data without the hassles or complexity of XPath
- Automatically construct XML from CSV files and other non-XML data
- Query Active Directory by extending LINQ
Introduction 1
Part I Getting Ready for LINQ
1 Programming with Anonymous Types 5
2 Using Compound Type Initialization 29
3 Defining Extension and Partial Methods 61
4 yield return: Using .NET’s State Machine Generator 85
5 Understanding Lambda Expressions and Closures 97
6 Using Standard Query Operators 121
Part II LINQ for Objects
7 Sorting and Grouping Queries 137
8 Using Aggregate Operations 151
9 Performing Set Operations 167
10 Mastering Select and SelectMany 185
11 Joining Query Results 211
12 Querying Outlook and Active Directory 239
Part III LINQ for Data
13 Querying Relational Data with LINQ 265
14 Creating Better Entities and Mapping Inheritance and Aggregation 289
15 Joining Database Tables with LINQ Queries 309
16 Updating Anonymous Relational Data 349
17 Introducing ADO.NET 3.0 and the Entity Framework 383
Part IV LINQ for XML
18 Extracting Data from XML 415
19 Comparing LINQ to XML with Other XML Technologies 437
20 Constructing XML from Non-XML Data 453
21 Emitting XML with the XmlWriter 463
22 Combining XML with Other Data Models 469
23 LINQ to XSD Supports Typed XML Programming 485
Index
Downloads
Related Articles
Online Sample Chapter
Programming with Anonymous Types in C#
Sample Pages
Table of Contents
Introduction 1
Part I Getting Ready for LINQ
1 Programming with Anonymous Types 5
2 Using Compound Type Initialization 29
3 Defining Extension and Partial Methods 61
4 yield return: Using .NET’s State Machine Generator 85
5 Understanding Lambda Expressions and Closures 97
6 Using Standard Query Operators 121
Part II LINQ for Objects
7 Sorting and Grouping Queries 137
8 Using Aggregate Operations 151
9 Performing Set Operations 167
10 Mastering Select and SelectMany 185
11 Joining Query Results 211
12 Querying Outlook and Active Directory 239
Part III LINQ for Data
13 Querying Relational Data with LINQ 265
14 Creating Better Entities and Mapping Inheritance and Aggregation 289
15 Joining Database Tables with LINQ Queries 309
16 Updating Anonymous Relational Data 349
17 Introducing ADO.NET 3.0 and the Entity Framework 383
Part IV LINQ for XML
18 Extracting Data from XML 415
19 Comparing LINQ to XML with Other XML Technologies 437
20 Constructing XML from Non-XML Data 453
21 Emitting XML with the XmlWriter 463
22 Combining XML with Other Data Models 469
23 LINQ to XSD Supports Typed XML Programming 485
Index

This book includes Instant Online Access with
and free shipping!
Instant Online Access with Safari Books Online
With your book purchase you are entitled to free, instant online access to that book on Safari Books Online for 45 days. After you've completed your purchase, you will receive instructions on how to log into Safari Books Online. If you do not want to receive online access to the book, simply uncheck the box for Instant Online Access in your cart.
This book includes Instant Online Access with
and free shipping!
Instant Online Access with Safari Books Online
With your book purchase you are entitled to free, instant online access to that book on Safari Books Online for 45 days. After you've completed your purchase, you will receive instructions on how to log into Safari Books Online. If you do not want to receive online access to the book, simply uncheck the box for Instant Online Access in your cart.

eBook (Watermarked)
$39.99
$29.99
This PDF is easy to download and read -- no passwords or activation required. We customize your PDF by watermarking each page with your name in the lower right corner.
Your PDF will be accessible from your Account page after purchase and requires the free Adobe® Reader® software to read it.
We respect your choice for easy-to-use digital content and hope in return you will respect the hard work that went into producing it.
- Save more by becoming a member.
- Request an Instructor or Media review copy.
- Corporate, Academic, and Employee Purchases
- International Buying Options
Online access to books, videos, and tutorials from Addison Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media and others - starting as low as $22.99. Learn more and start a free trial.


Account Sign In
View your cart