 |
BOOK: Professional ASP.NET MVC 2
 | This is the forum to discuss the Wrox book Professional ASP.NET MVC 2 by Jon Galloway, Scott Hanselman, Phil Haack, Scott Guthrie, Rob Conery; ISBN: Professional ASP.NET MVC 2 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET MVC 2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

January 2nd, 2011, 10:03 PM
|
Friend of Wrox
|
|
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
|
|
Errata on page 30 regarding DinnerRepository
Hello,
As i was writting code from page 30. Visual Studio give me an error on the bolded line in :
public void Delete(Dinner dinner) {
foreach (var rsvp in dinner.RSVPs) {
entities.RSVPs.DeleteObject(dinner.RSVPs);
}
entities.Dinners.DeleteObject(dinner);
}
i believe this should be entities.RSVPs.DeleteObject(rsvp); instead of
entities.RSVPs.DeleteObject(dinner.RSVPs);
Thanks.
|

January 2nd, 2011, 10:47 PM
|
Friend of Wrox
|
|
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
|
|
What the hell. I sent an email to Wrox regarding this errata and got answered this :
Thank you for contacting Wiley Technical Support. Information about the code on page 30 can be found at:
http://www.wiley.com/WileyCDA/WileyT...Cd-ERRATA.html
code snippet 1-3.txt
This code snippet is designed to illustrate the associated concepts and is not designed to be complied. There are no errors in it but it will not run.
Please let us know if you have any more questions.
There IS an error in this code... how this fellowing code is supposed to be logical and free of any errors ?
public void Delete(Dinner dinner) {
foreach (var rsvp in dinner.RSVPs) {
entities.RSVPs.DeleteObject(dinner.RSVPs);
}
entities.Dinners.DeleteObject(dinner);
}
You actually tell to delete the collection of RSVPs while looping through it.. furthermore.. deleteObject accept only an rsvp entity so it should be a single rsvp.
The logical way should be delete all RSVPs associated by the dinner and delete the dinner.
Anyone could reply telling that i am correct ?
Thanks.
|

January 3rd, 2011, 11:22 AM
|
Friend of Wrox
|
|
Join Date: Oct 2010
Posts: 106
Thanks: 1
Thanked 17 Times in 17 Posts
|
|
You are correct. Don't expect a whole lot of response from the publishers. I've handed them dozens of errata and have never got any response. They don't appear to be monitoring the forums either.
|

January 3rd, 2011, 11:33 AM
|
Friend of Wrox
|
|
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
|
|
This is sad, ive expected some support from them look like i was wrong. Thanks for the info.
|

January 4th, 2011, 11:46 AM
|
Registered User
|
|
Join Date: Jan 2011
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Rushino
Quote:
Originally Posted by Rushino
This is sad, ive expected some support from them look like i was wrong. Thanks for the info.
|
Thanks for posting the solution, Rushino...I'm just a newbie working through the book, and the intellisense error in VS2010 was pushing me down the wrong path.
I thought this error had something to do with autogenerated namespaces creating conflicting entities...you saved me a lot of time!
|

January 4th, 2011, 05:21 PM
|
Friend of Wrox
|
|
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
|
|
Bah no problems dude. I am glad it helped you. Through, i am a bit frustrated to discover that many have trouble with this book also on amazon.com there lots of poeple saying they having trouble and all. Lots of errata and no support. This is really disappointing. So i decided to return the book to amazon.
|

January 4th, 2011, 05:30 PM
|
Registered User
|
|
Join Date: Jan 2011
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Rushino
Bah no problems dude. I am glad it helped you. Through, i am a bit frustrated to discover that many have trouble with this book also on amazon.com there lots of poeple saying they having trouble and all. Lots of errata and no support. This is really disappointing. So i decided to return the book to amazon.
|
Sorry to hear that...I like the format of the book and want to work through it, so I hope I don't get hung up on too many typos :(
I already gave up on "Test-Drive ASP.NET MVC" because it was more out of date than this book. If we all went on ScottGu's blog and complained about the lack of support here, I'm sure he'd be proactive about it.
|

January 4th, 2011, 06:19 PM
|
Friend of Wrox
|
|
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
|
|
Quote:
Originally Posted by ebmudder
Sorry to hear that...I like the format of the book and want to work through it, so I hope I don't get hung up on too many typos :(
I already gave up on "Test-Drive ASP.NET MVC" because it was more out of date than this book. If we all went on ScottGu's blog and complained about the lack of support here, I'm sure he'd be proactive about it.
|
Bah don't worry. It was a personnal choice. I know ScottGu is a guru in ASP.NET MVC and i wish i could keep the book but i really hate to hurt a wall in a book. Since he is a guru and well known dude in the domain this is quite a surprise to see a book with so many typos coming from him. I just didnt expected that.. furthermore... he rated 5 star some other book that i won't name here but this one seem to be liked by many so i will give it a try.
Thanks.
|

January 24th, 2011, 05:09 PM
|
Registered User
|
|
Join Date: Jan 2011
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Errata updated (finally)
In the past few weeks there have been a lot of additions to the Errata page, including this issue:
30 Error in Code
Code Snippet 1-3 in the DinnerRepository class, the Delete(Dinner dinner) method:
Code:
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 Code Snippet1-3.txt download. The correct code should be:
Code:
foreach(RSVP rsvp in dinner.RSVPs.ToList()){
entities.RSVPs.DeleteObject(rsvp)
}
|

January 24th, 2011, 05:46 PM
|
Friend of Wrox
|
|
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
|
|
I gave up on this book a while ago lol
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Difficulty in DinnerRepository class |
dpuranik |
BOOK: Professional ASP.NET MVC 2 |
13 |
April 13th, 2011 03:27 AM |
Errata Page |
Saranjiv |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 |
1 |
July 13th, 2010 05:14 PM |
Error on page 38 in DinnerRepository |
adimauro |
BOOK: Professional ASP.NET MVC 2 |
3 |
July 6th, 2010 07:46 PM |
Errata Page |
bonehead |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
2 |
June 27th, 2004 08:45 AM |
|
 |
|