Wrox Programmer Forums
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 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
Old November 28th, 2014, 12:19 PM
Registered User
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.

namespace ProMusicStore
    public class MvcApplication : System.Web.HttpApplication
        protected void Application_Start()
            Database.SetInitializer(new MusicStoreDbInitilizer());
Old January 6th, 2015, 06:35 PM
Registered User
Join Date: Nov 2014
Posts: 8
Thanks: 4
Thanked 1 Time in 1 Post

Have you gotten an answer to this question?
Old January 7th, 2015, 04:21 AM
Wrox Author
Join Date: Oct 2006
Posts: 36
Thanks: 1
Thanked 5 Times in 5 Posts

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.

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

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