Thread: Errata
View Single Post
  #1 (permalink)  
Old September 9th, 2010, 07:52 AM
frez frez is offline
Registered User
Join Date: Sep 2010
Posts: 5
Thanks: 0
Thanked 6 Times in 3 Posts
Default Errata

Here are some of the errors I have found, that have you frustrated wondering if it is you or the book that is the problem:

page 30:
"entities.RSVPs.DeleteObject(dinner.RSVPs);" is wrong, should be "entities.RSVPs.DeleteObject(rsvp);"

page 35:
"[StringLength(265, ErrorMessage =" is wrong, should be "[StringLength(256, ErrorMessage ="

page 61:
The descriptions associated with the EventDate and ContactPhone fields in Figure 1-84 are inconsistent with the code. Adding a DisplayName attribute to the properties in your Dinner partial class will allow you to change the labels. This same problem is evident in other figures later in the book.

page 73:
The code for the create.aspx view will not create the look that is in figure 1-94. This is sorted out later when you implement a partial view based on the edit.aspx view, so don't worry about it.

page 89:
It is not clear from the code that the code on your edit view will now be like this:

<%: Html.LabelFor(m => m.Dinner.Title) %>

Instead of this:

<%: Html.LabelFor(m => m.Title) %>

i.e. Where "m." was present before it will be replaced by "m.Dinner." throughout the code in the view.

page 90:
As we are now using a DinnerFormViewModel in the view the TryUpdate in code snippet 1-53 needs to be changed.

"if (TryUpdateModel(dinner))" needs to be changed to "if (TryUpdateModel(dinner,"Dinner"))"

page 107:
You need to fully qualify the model you are inheriting from, i.e. you need to use this:

<NerdDinner.Helpers.PaginatedList<NerdDinner.Model s.Dinner>>

instead of this which is suggested in the book:

The Following 4 Users Say Thank You to frez For This Useful Post:
firedrawndagger (October 12th, 2010), flyinhawaiian (October 7th, 2010), Ole F (September 25th, 2010), Rushino (January 2nd, 2011)