Dinner/RSVP generated classes -- where?

Apr 19, 2010 at 11:33 PM
Edited Apr 19, 2010 at 11:35 PM

I posted this as a question on Scott's blog, and in his response he suggested I repeat it here.  So...

I have a question about the process of building NerdDinner in MVC as described in the book Professional ASP.NET MVC 1.0, and I'm using VS2010. The question has to do with the process of generating the model classes for the Dinner and RSVP tables. When the book and I come to the point of dragging the two database tables to the NerdDinner.dbml design surface, the book describes the process (echoed by the design surface's instructions) as dragging the tables from the server explorer to the surface. When I do this, the relationship between the Dinner and RSVP table (that view with their relationship) is created as the book describes, but no actual classes are generated by this action (at least I don't see the code for the classes in the Model folder or anywhere else). When I look a little more closely at the Solution Explorer view in the book (as it appears when describing the creation of the DinnerRepository class), I don't see Dinner or RSVP model classes there either -- so this appears to be what is expected. Despite the absence of the code, following the procedure described for building the DinnerRepository class, however, Intellisense picks up on the Dinner and RSVP classes and uses them as expected.

I'm just kind of confused as to why no class code appears for the two tables. Can you explain this?

Scott's response was: "Open up the DBML file tree in the Solution Explorer, the generated classes are in there. Feel free to move this conversation over to the nerddinner codeplex site as well."

I did open up the DBML file tree, and I don't see the two classes there, I'm afraid.  Here's what it looks like:

Free Image Hosting

So, am I looking in the wrong place or something?

 

Coordinator
May 15, 2010 at 12:19 AM

Did you open up the Designer File? The classes are inside there.