Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8361225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:39:05+00:00 2026-06-09T11:39:05+00:00

I am following the Microsoft music store tutorial for asp.net mvc 3 using visual

  • 0

I am following the Microsoft music store tutorial for asp.net mvc 3 using visual studio 2010, sp1. http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4 I am translating code into VB.

The tutorial says to add the following line to the application_start method of the Global.asax file, but the compiler says that it can’t find the file sample data:

Sub Application_Start()
    System.Data.Entity.Database.SetInitializer(  //MvcMusicStore.Models.SampleData' is not defined.
           New MvcMusicStore.Models.SampleData())
           ...
End Sub

I’m confused why the compiler can’t find this file because I have a SampleData.vb file under the models folder of the project, as shown in the picture below:

enter image description here

What am I missing?
– I added a namespace statement around the SampleData class to ensure that it is in the same namespace as the overall project

Namespace MvcMusicStore
        Public Class SampleData
            Inherits DropCreateDatabaseIfModelChanges(Of MusicStoreEntities)
    ...
        End Class
    End Namespace
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:39:06+00:00Added an answer on June 9, 2026 at 11:39 am

    Your namespace doesn’t match your initialization. Either change the namespace to read Namespace MvcMusicStore.Models, or change the initialization to say new MvcMusicStore.SampleData()

    Actually since you are in the same namespace you should be able to just write

    new SampleData()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing the following tutorial http://msdn.microsoft.com/en-us/library/ms731835%28v=vs.100%29.aspx and the program is working perfectly fine.
im writing an application using Visual Studio 2010 Express Edition. I have a problem
I tried to download the following: http://www.microsoft.com/en-us/download/details.aspx?id=507 but I get an error message: Is
following some example from Microsoft I created my custom MembershipProvider in my MVC application
Following the article at http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx I tried to setup development environment for SharePoint 2010
I am just following a very simple microsoft tutorial, at the topic Create a
I installed the following software into my laptop: Microsoft .NET Framework 4 (Standalone Installer)
I've been following Microsoft's guide for installing a dev environment on Windows 7: http://msdn.microsoft.com/en-us/library/ee554869.aspx
I have the following situation: Microsoft Report Viewer 2010 is used to display reports
I'm using the following Microsoft example . Every time the WindowsIdentity instance calls .Impersonate(),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.