LINQ Unleashed: for C# and over one million other books are available for Amazon Kindle. Learn more

LINQ Unleashed: for C# 1st Edition

9 customer reviews
ISBN-13: 978-0672329838
ISBN-10: 0672329832
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used
Buy new
Amazon Price New from Used from
"Please retry"
Paperback, July 24, 2008
"Please retry"
$33.97 $6.48
More Buying Choices
13 New from $33.97 22 Used from $6.48
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Amazon Educational Video Store
Amazon Educational Video Store
From Adobe to Microsoft and web design to photography, learn new skills in the Amazon's Educational Video Store. Explore More.
$47.24 FREE Shipping. Only 8 left in stock (more on the way). Ships from and sold by Gift-wrap available.

Frequently Bought Together

LINQ Unleashed: for C# + Essential LINQ + Pro LINQ: Language Integrated Query in C# 2010 (Expert's Voice in .NET)
Price for all three: $124.25

Buy the selected items together

Editorial Reviews

From the Back Cover

Foreword by Darryl Hogan, Architect Evangelist, Microsoft Corporation


Microsoft's highly anticipated LINQ query technology makes it easy to retrieveanyinformation programmatically fromanydata 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. InLINQ 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   MasteringSelectandSelectMany  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 theXmlWriter  463

       22   Combining XML with Other Data Models  469

       23   LINQ to XSD Supports Typed XML Programming  485


About the Author

Paul Kimmel is a four-time Microsoft MVP, the author of over a dozen books on object oriented programming and UML, including three books on Microsoft .NET, a columnist for,,,, and, a cofounder of the Greater Lansing Area .NET Users Group (, East Lansing and Flint), a full-time software developer, and sometimes pilot. Paul still lives and works in the greater Lansing, Michigan, area (and hasn’t given up on the economy). After 15 years of independent consulting, Paul now works for EDS as an application architect.


Shop the New Digital Design Bookstore
Check out the Digital Design Bookstore, a new hub for photographers, art directors, illustrators, web developers, and other creative individuals to find highly rated and highly relevant career resources. Shop books on web development and graphic design, or check out blog posts by authors and thought-leaders in the design industry. Shop now

Product Details

  • Paperback: 552 pages
  • Publisher: Sams Publishing; 1 edition (July 24, 2008)
  • Language: English
  • ISBN-10: 0672329832
  • ISBN-13: 978-0672329838
  • Product Dimensions: 7 x 1.4 x 8.9 inches
  • Shipping Weight: 1.8 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (9 customer reviews)
  • Amazon Best Sellers Rank: #956,125 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews

8 of 10 people found the following review helpful By robbi on January 19, 2009
Format: Paperback
I question the value of the previous reviews. The review of Sept. 18 does not convince me the reviewer ever read the book.

The book starts off decently with an introduction to concepts related to LINQ. Then it falls off sharply when the author attempts to explain key words and the underlying logic of LINQ queries.

The table of contents has to be taken as a statement of intent. The chapters on LINQ for Objects are disappointing -- bulky examples without much analysis or explanation of LINQ syntax.

It all gets a bit rambling as the author, or editor if there was one, loses sight of the goal, which should be to instruct.

I give it 4 stars because it is no worse than some other books I've read.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
5 of 6 people found the following review helpful By Summer2015 TOP 1000 REVIEWER on September 7, 2008
Format: Paperback
One of the author's stated goals for this book was to make learning LINQ interesting. I believe he succeeded. Whenever he had a chance to use less mundane examples to illustrate LINQ applications, he did so. This is also the first published book on LINQ that had interesting chapters on LINQ to XML.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By Oleg Shokodko on December 5, 2011
Format: Paperback Verified Purchase
Poorly organized. Text jumps all over place.
Bloated content.
Some of the examples, like smart client application for card game is just too long and has very little connection with Linq.

Introduction to Net features used by linq.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
6 of 8 people found the following review helpful By Arne Garvander on September 11, 2008
Format: Paperback
I higly recommend this book. It is easy to read and keeps you interested.
It is the first book that tries to describe the Entity Framework in one of its chapters.
The author gives a thorough description of hundreds of ways to make a select statement. Update, insert, and delete are described in very few paragraphs which seems a little bit thin.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 4 people found the following review helpful By James D. Pollard on December 23, 2009
Format: Paperback Verified Purchase
You get about six chapters in before you really even touch LINQ. Author Kimmel spends the opening chapters of this book explaining all of the "enabeling technologies" that make up LINQ. All of the newer syntactical features of C#, such as anonymous types and delegates, extension methods, lambda expressions, and more, are the machinery that makes LINQ go. Once you have an understanding of these, you can start to see, for example, how a few lines of compiled C# translate to an SQL query against a database.

I have used C# for years, but had fallen behind on some of the newer additions to the toolset. Lambda expressions particularly blow me away - these completely transform the C# language. (And VB too, for that matter.) With lambda expressions, it's a functional programming language, now, like ML, or Haskell.

I approached this material from the point of view of someone who writes a lot of .Net application code against databases, and of course LINQ does that, but it's just the beginning. Authour Kimmel shows how these new syntactical features of the C# language (and .Net runtime) open up new possibilities for programmers. By concisely specifying your implementations at a higher level of abstraction, you become more powerful. You can start to think in terms of predicates and sets, instead of in terms of writing a loop to iterate through a collection.

The book quite thoroughly covers LINQ to SQL, LINQ to XML, and much more. Lots of good examples, including some intersting example code that uses LINQ with Active Directory.

I recommend this book as a valuable addition to the library of more senior programmers on advanced .Net concepts.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
LINQ Unleashed: for C#
This item: LINQ Unleashed: for C#
Price: $47.24
Ships from and sold by

Want to discover more products? Check out this page to see more: programming