This project is read-only.

Confused about the Tutorial

Sep 30, 2010 at 10:11 PM

I am a total noob, so sorry if this is a dumb question...

On page 29, the instruction is:

"We’ll start by adding a using MvcMusicStore.Models statement to the using statements list at the top of the controller, then modify the Browse and Details methods to appear as follows:"

However, the instructions don't specify which controller is "the" controller.  At this point, no Browse or Details methods have been set up either, as far as I can tell.  

Do I need to set up a new controller to do this?  Should I be adding that section to the StoreBrowseViewModel page?  (That doesn't seem right, but the instructions are directly beneath this section.)  If yes to this, then where would the changes go on this page?

Thank you for the help!

Oct 1, 2010 at 1:11 AM

This is in the StoreController which we created on page 14. The Browse and Details methods were added there as well.

Oct 1, 2010 at 1:38 AM

Aha... so on page 24, when I was instructed to:

"...change the StoreController’s Index action method to return that ViewModel" I wasn't supposed to replace EVERYTHING with the coding written there.  I see, OK.  That was completely unclear, so I replaced both the Browse and Details methods with what was shown to me.  


Separate question... I ran into a problem on page 26 - at the top of the page, it shows how my page should look when I add "NumberOfGenres" between <%:%>

Then, it tells me to add a foreach loop but, at the bottom of the page it shows what my template is supposed to look like, and it's not the same as the top at all.  

Where the NumberOfGenres diagram is it shows "<h2>Store Name</h2>", but the completed diagram shows "<h3>Browse Genres</h3>"

So, I replaced <h2>Store Name</h2> with <h3>Browse Genres</h3>.  And I replaced <p>Browsing <%: Model.NumberOfGenres%</p> with <p>Select from <%: Model.NumberOfGenres %> genres:</p>.  Is that correct?