LINQ in Action - LINQ Book & News

LINQ in Action Errata (First Edition, February 2008)

All mistakes found in the first edition of LINQ in Action are posted here.
If you discover any mistakes in the book, you may post them as a comment to the errata for the second edition or in the forum.


Chapter 3, page 91, Listing 3.5

Add a pointer to QueryReuse.csproj in the caption.

Chapter 3, page 92

Add a note. See this forum post.

Chapter 4, Page 128, Listing 4.7

Inherits=" Step1" has an unnecessary space

Chapter 4, page 133, line 8

Comma missing at the end of the line, after "select new { book.Title, book.Price"

Chapter 4, page 151, line 9

The listing should be:

from book in SampleData.Books
group book by book.Publisher into publisherBooks
select new {
  Publisher=publisherBooks.Key.Name,
  Books=publisherBooks,
  Count = publisherBooks.Count() };

Chapter 4, page 154, line 3 in section Cross join

isasequencethatcontainsacombonationofeach ismissingappropriatespaces

Chapter 4, page 157, listing 4.29

#1's do not belong here

SampleData.Books and .Select... should be indented with two more spaces

Chapter 6, page 216

The SQL query that is executed against the database as a result of running the Listing 6.8 / 6.9 example, is mentioned to be "SELECT TOP 2 [t1].[Title], [t1].[Price]...", but the SQL that is actually being generated by these listings appears to be slightly different:
SELECT [t1].[Title], [t1].[Price]
FROM (SELECT ROW_NUMBER() OVER (ORDER BY [t0].[Title], [t0].[Price]) AS [ROW_NUMBER], [t0].[Title], [t0].[Price]
FROM [dbo].[Book] AS [t0]) AS [t1]
WHERE [t1].[ROW_NUMBER] BETWEEN @p0 + 1 AND @p0 + @p1
ORDER BY [t1].[ROW_NUMBER]

Chapter 6, page 219, first query

book.PubDate should be be book.PublicationDate (twice)

Chapter 6, page 223

System.Enumerable.Linq.Join should be System.Linq.Enumerable.Join
Chapter 6, page 227
"From an object perspective, when we fetch the list of subjects, we don't know if there are any associated books attached to each book." should be "From an object perspective, when we fetch the list of subjects, we don't know if there are any associated books attached to each subject."
Chapter 6, page 231, section 6.5.2
"Thus, we could change our earlier implementation to indicate that we want to load all of the customers once..." should be "Thus, we could change our earlier implementation to indicate that we want to load all of the subjects once..."
Chapter 7, page 244, paragraph 3, line 1
"So far in this chapter we've focused on the three main attributes -- Table, Column, and Attribute." should be "So far in this chapter we've focused on the three main attributes -- Table, Column, and Association."

Chapter 7, page 258, end of the second-last paragraph

After the sentence "If the requested object is not in the cache, the database will be queried." there should be "This optimization did not make it into the initial release, but may return in future updates."

Chapter 8, page 287, Listing 8.16

The preceding paragraph says: "Here we see the code generated by the designer." However, the code sample represents the customized method, not the auto-generated method. The text should be "Here we see custom code that supplies additional information."

Chapter 8, Page 303, paragraph 2

"Set the name of the property to PropertyId." should be "Set the name of the property to PublisherId", and PublisherId should be in Courier.

Chapter 9, Page 327

LoadOptions.PerserverWhiteSpace should be LoadOptions.PreserveWhiteSpace

Chapter 10, page 376, line 13

Sytem should be System

Chapter 12, Page 473

The #2 in the second example doesn't belong there.

Chapter 13, page 513, line 1

EntitySpaces has no real support for LINQ and so shouldn't be in the list

More Titles From Manning (page 543)

"C++/CLI In Action" is referred to as "C##/CLI in Practice"

Published Wednesday, May 07, 2008 11:32 PM by Fabrice Marguerie

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Marc Ziss said:

Page 133 (chaper 4)

Missing comma

     from book in SampleData.Books

     where book.Title.Length > 10

     orderby book.Price

     select new { book.Title, book.Price (should be comma here)

            Publisher=book.Publisher.Name, Authors=book.Authors.Count()

};

February 10, 2008 3:48 PM
 

Marc Ziss said:

pg 154

isasequencethatcontainsacombonationofeach

ismissingappropriatespaces

February 10, 2008 3:53 PM
 

Marc Ziss said:

Page 157

#1's do not belong here

     GridViewComplete.DataSource =   #1

       SampleData.Books   #1

         .Select((book, index) => new { Index=index, Book=book.Title});

     GridViewComplete.DataBind();

February 10, 2008 3:55 PM
 

Fabrice Marguerie said:

Thank you Marc!

We'll make sure this gets fixed in the next edition.

The isasequencethatcontainsacombinationofeach typo is a great one. Strange things can happen when a book is typeset!

February 11, 2008 1:54 PM
 

Gardner said:

p. 80, shouldn't the final, complete code be without the ProcessData class definition? And the actual code inside the DisplayProcesses, inside the if statement, should be

"..Add(new {ID = ..."?

March 5, 2008 12:38 AM
 

Fabrice Marguerie said:

Gardner,

No, we need the processes variable to be based on the ProcessData class, so we can use the TotalMemory extension method. This method works on an enumeration of ProcessData objects. Anonymous types are demonstrated a few lines below.

In addition, the ProcessData class is used to demonstrate auto-implemented properties - even if it's not clearly indicated in this listing.

Thanks for the suggestion,

Fabrice

March 5, 2008 1:53 AM
 

Laurion Burchall said:

Chapter 2, page 62

delegate void Action<T1, T2, T3>(T1 arg1, T2 arg2) should take 'T3 arg3' as a third argument

delegate TResult Func<T1, T2, T3, TResults>(T1 arg1, T2 arg2) should also take 'T3 arg3' as a third argument

March 25, 2008 10:47 AM
 

Laurion Burchall said:

Chapter 4, Page 128, Listing 4.7

Inherits=" Step1" seems to have an unnecessary space?

March 25, 2008 10:48 AM
 

Laurion Burchall said:

Chapter 9, Page 327

LoadOptions.PerserverWhiteSpace should be

LoadOptions.PreserveWhiteSpace

March 25, 2008 10:53 AM
 

Laurion Burchall said:

Chapter 12, Page 473

The #2 in the second example doesn't belong there.

March 25, 2008 10:55 AM
 

Laurion Burchall said:

"More Titles From Manning" (page 543)

"C++/CLI In Action" is referred to as "C##/CLI in Practice"

March 25, 2008 10:56 AM
 

Fabrice Marguerie said:

Laurion, thanks a lot for reporting these!

March 27, 2008 4:09 AM
 

David Miller said:

Page 223

There is a misstatement:

System.Enumerable.Linq.Join should be

System.Linq.Enumerable.Join.

April 3, 2008 6:34 AM
 

Fabrice Marguerie said:

Thank you David.

April 5, 2008 8:13 AM
 

Martillo said:

Page 287, Listing 8.16:

The preceding paragraph says: "Here we see the code generated by the designer." However, I believe the code sample represents the customized method, not the auto-generated method.

May 1, 2008 9:18 PM
 

Martillo said:

I don't know if you're making corrections to the code samples, but something that may be a little confusing to some is that in the  Chapter06to08.Sharp solution, the Ch8DataContext partial class file is named "Ch9DataContext.cs"

May 2, 2008 7:00 AM
 

Fabrice Marguerie said:

Thanks a lot Martillo.

We'll make sure your remarks are taken into account for the second printing.

I'll also update the code to avoid confusion.

Fabrice

May 2, 2008 7:30 AM
 

Martillo said:

Another source code observation:

In the LinqBooks.dbml file, the Author-to-AuthorUser and Publisher-to-PublisherUser associations seem to be pointing in the wrong direction, with the AuthorUser and PublisherUser classes indicated as parent classes instead of child classes... unless I'm reading it wrong...

May 2, 2008 9:44 AM
 

LINQ in Action - LINQ Book & News said:

All mistakes found in the second edition of LINQ in Action are posted here. If you discover any mistakes

May 7, 2008 2:39 PM
 

LINQ in Action - LINQ Book & News said:

LINQ in Action is doing well. We're all happy with the sales and all the reviews , on Amazon (5 stars

May 7, 2008 3:17 PM
 

Fabrice's weblog said:

LINQ in Action is doing well. We're all happy with the sales and all the reviews , on Amazon (5 stars

May 8, 2008 11:24 AM
 

Martillo said:

In the first edition source code, I believe the CSharp code for example 8-25 is not the correct example (compare with the VB code for listing 8-25)

May 9, 2008 3:15 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

Featured Item

This Blog

Sponsoring

Syndication

Tags

No tags have been created or used yet.