p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET MVC 5 (http://p2p.wrox.com/forumdisplay.php?f=770)
-   -   Chapter 5: I needed to add code in HomeController.cs (http://p2p.wrox.com/showthread.php?t=95391)

Glickt December 28th, 2015 02:40 PM

Chapter 5: I needed to add code in HomeController.cs
 
This is concerning Listing 5-2 on page 112. I needed to add two code statements:

I added the following at the top of the program:

Code:

using MvcMusicStore.Models;
I added the following at the top of class HomeController:

Code:

private MusicStoreDB storeDB = new MusicStoreDB();
When I added the following, I got the program to work.

gabrie1 September 22nd, 2017 01:11 AM

Follow Up
 
I used the
Code:

private MusicStoreDB storeDB = new MusicStoreDB();
and it worked for me too. Thank you for posting. I've been stuck on that for awhile.


All times are GMT -4. The time now is 09:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.