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:

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
Your namespace doesn’t match your initialization. Either change the namespace to read
Namespace MvcMusicStore.Models, or change the initialization to saynew MvcMusicStore.SampleData()Actually since you are in the same namespace you should be able to just write
new SampleData()