Error on page 30 in DinnerRepository
I couldn't find any errata link on the book page, so I am assuming we post all errata here?
Anyway, there is an error on page 30 in the DinnerRepository class, the Delete(Dinner dinner) method:
foreach(var rsvp in dinner.RSVPs){
entities.RSVPs.DeleteObject(dinner.RSVPs)
}
This does not work, and throws a compliation error. The error is also repeated in the downloaded code. But, I found the correct code on the NerdDinner2.0 Codeplex download:
foreach(RSVP rsvp in dinner.RSVPs.ToList()){
entities.RSVPs.DeleteObject(rsvp)
}
Last edited by adimauro; June 22nd, 2010 at 12:36 PM..
Reason: Edited to correct page number. Should be page 30.
|