Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5.1 > BOOK: Professional ASP.NET MVC 5
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 5
This is the forum to discuss the Wrox book Professional ASP.NET MVC 5 by Jon Galloway, Brad Wilson, K. Scott Allen, David Matson; ISBN: 978-1-118-79475-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 28th, 2014, 12:19 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with Chapter 4 in VS 2013

I'm attempting to follow the tutorial in Chapter 4 in VS 2013. I am not able to get the database seeded properly. This is a snippit from my global.asax file. VS is giving me two build errors. I added using System.Data.Entity; to the top of the file. That eliminated one error. However, I'm still getting "The type or namespace name 'MusicStoreDbInitilizer' could not be found..." If I comment out the Database.SetInitilizer... line the project builds but the database is not seeded. Any help is appreciated.

Also, if somebody could help me find the right Nuget package for this chapter's code that would be great. When using the Nuget package manager it doesn't seem to be available.

Code:
namespace ProMusicStore
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            Database.SetInitializer(new MusicStoreDbInitilizer());
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
    }
Reply With Quote
  #2 (permalink)  
Old January 6th, 2015, 06:35 PM
Registered User
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2014
Posts: 8
Thanks: 4
Thanked 1 Time in 1 Post
Default

Have you gotten an answer to this question?
Reply With Quote
  #3 (permalink)  
Old January 7th, 2015, 04:21 AM
Wrox Author
Points: 165, Level: 3
Points: 165, Level: 3 Points: 165, Level: 3 Points: 165, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2006
Location: San Diego, CA, USA
Posts: 36
Thanks: 1
Thanked 5 Times in 5 Posts
Default

If you're having trouble, I recommend directly downloading the Chapter 4 sample code here: http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html

You should see a MusicStoreDbInitializer.cs file in your Models folder.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sharepoint 2013 sorin ASP.NET 4.5.1 General Discussion 0 August 24th, 2014 06:50 PM
Book 4.5 work with VSEW 2013 bogdan BOOK: Beginning ASP.NET 4.5 : in C# and VB 1 April 11th, 2014 03:06 AM
Configure DNS for sharepoint 2013 ThePublican BOOK: Professional SharePoint 2013 Administration 2 December 11th, 2013 06:06 PM
code for chapter 8 of the book "Professional Access 2013"? Mike31 BOOK: Professional Access 2013 Programming 1 November 26th, 2013 04:02 PM
VS 2013 Preview - Build Style lindnergt BOOK: Professional ASP.NET 4.5 : in C# and VB 4 July 11th, 2013 10:54 AM



All times are GMT -4. The time now is 10:12 PM.


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