Pro LINQ: Language Integrated Query in C# 2010

Front Cover
Apress, Jun 30, 2010 - Computers - 840 pages

LINQ is the part of the .NET Framework that provides a generic approach to querying data from different data sources. It has quickly become the next must-have skill for .NET developers. Pro LINQ: Language Integrated Query in C# 2010 is all about code. Literally, this book starts with code and ends with code. Most books show the simplest examples of how to use a method, but they so rarely show how to use the more complex prototypes. This book is different. Demonstrating the overwhelming majority of LINQ operators and prototypes, it is a veritable treasury of LINQ examples.

Rather than obscure the relevant LINQ principles in code examples by focusing on a demonstration application you have no interest in writing, this book cuts right to the chase of each LINQ operator, method, or class. However, where complexity is necessary to truly demonstrate an issue, the examples are right there in the thick of it. For example, code samples demonstrating how to handle concurrency conflicts actually create concurrency conflicts so you can step through the code and see them unfold.

Face it, most technical books, while informative, are dull. LINQ need not be dull. Written with a sense of humor, this book will attempt to entertain you on your journey through the wonderland of LINQ and C# 2010.

What you’ll learn How to leverage all the new LINQ relevant C# 2008 language features including extension methods, lambda expressions, anonymous data types, and partial methods. How to use LINQ to Objects to query in-memory data collections such as arrays, ArrayLists, and Lists to retrieve the data you want. Why some queries are deferred, how a deferred query can bite you, and how you can make deferred queries work for you. How to use LINQ to XML to revolutionize your creation, manipulation, and searching of XML data. How to query DataSets with LINQ to DataSet so you can coexist with legacy code and use LINQ to query databases other than SQL Server. How to query Databases with LINQ to SQL, write your own entity classes, and understand how to handle concurrency conflicts. Who this book is for

This book is written for the proficient C# developer, but you do not need to be up on all the latest C# features to understand the material. When you finish this book, you will have a much greater understanding of the latest C# features.

Table of Contents Hello LINQ C# Language Enhancements for LINQ LINQ to Objects Introduction Deferred Operators Nondeferred Operators LINQ to XML Introduction The LINQ to XML API LINQ to XML Operators Additional XML Capabilities LINQ to DataSet Operators Additional DataSet Capabilities LINQ to SQL Introduct ion LINQ to SQL Tips and Tools LINQ to SQL Database Operations LINQ to SQL Ent ity Classes The LINQ to SQL DataContext LINQ to SQL Concurrency Conflicts Additional LINQ to SQL Capabilities LINQ to Entities Introduction LINQ to Entities Operations LINQ to Entities Classes Parallel LINQ Introduction Using Parallel LINQ Parallel LINQ Operators

What people are saying - Write a review

Good Overall

User Review  - ClearCSSJimmy - Borders

Being a novice at LINQ, I found this book to be very helpful. I am a visual person, so the examples in the book helped me to get started pretty quickly. I was able to pick up the syntax right away ... Read full review

User Review - Flag as inappropriate

Very upset... your Halloween example .. .listing 7-13 Does Not Work. I guess this trick is on me.
When you try to create a Generic Colloection it gives the old..
: Object reference not set to an instance of an object. Trick...
Just when I was thinking the Your book would be better than the rest!


LINQ to Objects
LINQ to DataSet
LINQ to Entities
Parallel LINQ

Other editions - View all

Common terms and phrases

About the author (2010)

Joseph C. Rattz, Jr., unknowingly began his career in software development in 1990 when a friend asked him for assistance writing an ANSI text editor named ANSI Master for the Commodore Amiga. A hangman game (the Gallows) soon followed. From these compiled BASIC programs, he moved on to programming in C for more speed and power. Joe then developed applications that were sold to JumpDisk, an Amiga disk magazine, as well as Amiga World magazine. Due to developing in a small town on a fairly isolated platform, Joe learned all the wrong ways to write code. It was while trying to upgrade his poorly written applications that he gained respect for the importance of easily maintainable code. It was love at first sight when Joe spotted a source-level debugger in use for the first time.

Two years later, Joe obtained his first software development opportunity at Policy Management Systems Corporation as an entry–level programmer developing a client/server insurance application for OS/2 and Presentation Manager. Through the years, he added C++, Unix, Java, ASP, ASP.NET, C#, HTML, DHTML, and XML to his skill set, while developing applications for SCT, DocuCorp, IBM, and the Atlanta Committee for the Olympic Games, CheckFree, NCR, EDS, Delta Technology, Radiant Systems, and the Genuine Parts Company. Joe enjoys the creative aspects of user interface design, and he appreciates the discipline necessary for server-side development. But, given his druthers, his favorite development pastime is debugging code.

Joe can be found working for the Genuine Parts Company—the parent company of NAPA—in the Automotive Parts Group Information Systems department, where he works on his baby, the storefront web site. This site for NAPA provides the stores a view into their accounts and data on a network of AS/400s.

Adam Freeman is an experienced IT professional who has held senior positions in a range of companies, most recently serving as chief technology officer and chief operating officer of a global bank. Now retired, he spends his time writing and training for his first competitive triathlon.

Bibliographic information