View Single Post
  #1 (permalink)  
Old April 23rd, 2008, 06:04 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default LINQ to SQL example for TBH - Wrox Blox Errata

Hello everyone,
I am going to maintain this thread as errors in the manuscript or code come to light.

The last code example directly before the section on Scalar Functions (~pg 17) displays this code as to be added:
Code:
return new Article(record.ID, record.AddedDate, record.AddedBy,
                record.CategoryID, record.tbh_Category.Title, 
                record.Title, record.Abstract, record.Body, 
                record.Country, record.State, record.City, 
                (DateTime)record.ReleaseDate, 
                (DateTime)record.ExpireDate, record.Approved,  
                record.Listed, record.CommentsEnabled,  
                record.OnlyForMembers, record.ViewCount, 
                record.Votes, record.TotalRating);
It needs to instead be:
Code:
return new Article(record.ArticleID, record.AddedDate, record.AddedBy,
                record.CategoryID, record.tbh_Category.Title, 
                record.Title, record.Abstract, record.Body, 
                record.Country, record.State, record.City, 
                (DateTime)record.ReleaseDate, 
                (DateTime)record.ExpireDate, record.Approved,  
                record.Listed, record.CommentsEnabled,  
                record.OnlyForMembers, record.ViewCount, 
                record.Votes, record.TotalRating);
This is only an issue if you are copying the code directly from the manuscript; the code download is correct.

Thanks!
-Doug

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================