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



or
Sign in to turn on 1-Click ordering
More Buying Choices
Have one to sell? Sell yours here
Start reading LINQ Unleashed: for C# on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

LINQ Unleashed: for C# [Paperback]

Paul Kimmel
4.4 out of 5 stars  See all reviews (9 customer reviews)

List Price: $54.99
Price: $36.63 & FREE Shipping. Details
You Save: $18.36 (33%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 3 left in stock (more on the way).
Ships from and sold by Amazon.com. Gift-wrap available.
Want it Thursday, June 20? Choose One-Day Shipping at checkout. Details
Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Kindle Edition $19.80  
Paperback $36.63  
Rent Your Textbooks
Save up to 70% when you rent your textbooks on Amazon. Keep your textbook rentals for a semester and rental return shipping is free.

Book Description

July 24, 2008 0672329832 978-0672329838 1
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


Frequently Bought Together

LINQ Unleashed: for C# + Pro LINQ: Language Integrated Query in C# 2010 + LINQ in Action
Price for all three: $100.36

Buy the selected items together


Editorial Reviews

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 codeguru.com, developer.com, informit.com, devsource.com, and devx.com, a cofounder of the Greater Lansing Area .NET Users Group (glugnet.org, 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.

Excerpt. © Reprinted by permission. All rights reserved.

Introduction

Introduction

By the time you are holding this book in your hands, I will have 30 years in since the first time I wrote some code. That code was ROM-BASIC on a TRS-80 in Washington grammar school in Owosso, Michigan, and I was in the fifth grade. Making the "tank" slide back and forth shooting blips across the screen was neat. Changing the code to change blip speeds and numbers of targets was exhilarating. Three decades later and I get more excited each passing year. There are great technologies on the horizon like Microsoft Surface, Popfly, and LINQ. This book is about LINQ, or Language INtegrated Query.

LINQ is a SQL-like language for C#. When I first saw it, I didn't like it. My first impression was that someone had glommed on a bastardization of C# and it was ugly like SQL can get. I didn't like it because I didn't understand it. However, I gave LINQ a second chance (as I want you to do) and discovered that LINQ is thoroughly integrated, tremendously powerful, and almost as much fun as a Tesla Roadster or doing hammerheads in an Extra 300L.

The query capabilities of LINQ are extended to objects, SQL, DataSets, XML, XSD, entities, and can be extended to other providers like Active Directory or SharePoint. This means that you can write queries—that are similar in syntax—against objects, data, XML, XSD, entities, or Active Directory (with a little work) much like you would a SQL query in a database. And, LINQ is actually engineered artfully and brilliantly on top of generics as well as some new features in .NET 3.5, such as extension methods, anonymous types, and Lambda Expressions. Another very important characteristic of LINQ is that it clearly demonstrates Microsoft's willingness to innovate and take the best of existing technologies like Lambda Calculus—invented in the 1930s—and if it's good or great, incorporate these elements into the tools and languages we love.

LINQ and its underpinnings are powerful and challenging, and in this book you will get what you need to know to completely understand all that makes LINQ work and begin using it immediately. You will learn about anonymous methods, extension methods, Lambda Expressions, state machines, how generics and the CodeDOM play a big role in powerful tools like LINQ, and writing LINQ queries and why you will want to do it in the bigger, grander scheme of things. You will also learn how to save a ton of time and effort by not hard-coding those elements that you will no longer need or want to hard-code, and you will have a better grasp of how LINQ fits into n-tier architectures without breaking guidelines that have helped you succeed to date.

Brought to you by a four-time Microsoft MVP and columnist for over a decade, LINQ Unleashed for C# will teach you everything you need to know about LINQ and .NET 3.5 features and how to be more productive and have more fun than ever before.

Conventions Used in This Book

The following typographic conventions are used in this book:

Code lines, commands, statements, variables, and text you see onscreen appear in a monospace typeface.

Occasionally in listings bold is used to draw attention to the snippet of code being discussed.

Placeholders in syntax descriptions appear in an italic monospace typeface. You replace the placeholder with the actual filename, parameter, or whatever element it represents.

Italics highlight technical terms when they're being defined.

A code-continuation icon is used before a line of code that is really a continuation of the preceding line. Sometimes a line of code is too long to fit as a single line on the page. If you see before a line of code, remember that it's part of the line immediately above it.

The book also contains Notes, Tips, and Cautions to help you spot important or useful information more quickly.


© Copyright Pearson Education. All rights reserved.


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.1 x 9.1 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: #686,415 in Books (See Top 100 in Books)

More About the Author

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

Customer Reviews

4.4 out of 5 stars
(9)
4.4 out of 5 stars
Share your thoughts with other customers
Most Helpful Customer Reviews
6 of 7 people found the following review helpful
4.0 out of 5 stars rambling - not really instructive January 19, 2009
By robbi
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?
6 of 7 people found the following review helpful
5.0 out of 5 stars Linq 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?
5 of 6 people found the following review helpful
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?
2 of 2 people found the following review helpful
5.0 out of 5 stars Much deeper than just LINQ December 23, 2009
Format:Paperback|Amazon 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?
5.0 out of 5 stars Great book August 29, 2012
Format:Paperback|Amazon Verified Purchase
The book really helps you to get up and running using LINQ. Many things are explained like extension methods, LINQ as query, lambda expressions, yield return, using LINQ with different technologies, extending LINQ with your own libraries, etc. Really worth reading.
Comment | 
Was this review helpful to you?
5.0 out of 5 stars LINQ Unleashed for C# January 14, 2012
Format:Paperback|Amazon Verified Purchase
This is one of the best technical books I have read in a long time. It is very clear and concise with code samples you can easily follow and try by writing it and compiling it. The code works exactly as described with very little or no modifications.
Comment | 
Was this review helpful to you?
3.0 out of 5 stars Poorly organized. Bloated. December 5, 2011
Format:Paperback|Amazon Verified Purchase
Dislike:
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.

Like:
Introduction to Net features used by linq.
Comment | 
Was this review helpful to you?
3 of 5 people found the following review helpful
5.0 out of 5 stars Awesome LINQ For C# Textbook September 18, 2008
Format:Paperback
I purhased that book a couple weeks ago, and man, I love it so much. The author has done an execellent job in explaining the subject. If you really serious about learning Microsoft Language Integrated Query (LINQ), I highly recommend that you buy that book and let the journey begins.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
Search Customer Reviews
Only search this product's reviews


Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



So You'd Like to...


Create a guide


Look for Similar Items by Category