So bare in mind the "Mvc Music Store" was MVC 101 since the beginning of MVC. Given there have been a lot of changes, the chances of the documentation/walk-throughts being a little off are unfavorable. With that said:
The T4 template for the data-driven controller is obviously failing due to your connection string. This is most likely because SQL Express (in it of itself) has gone through a lot of cycles and is now following LocalDB. Given you're using MVC4, it's probably a good time to upgrade, and this means you can have all the benefits of SQL Express (including the
System.Data.SqlClient provider) without the possible headaches from previous revisions.
With that said, change your connection string to use the new format:
<connectionStrings> <add name="MusicStoreEntities" connectionString="Data Source=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=|DataDirectory|MvcMusicStore.mdf" providerName="System.Data.SqlClient" /> </connectionStrings>
And (probably) re-run your DatabaseInitializer (if I recall correctly, this should happen automatically since it's using EF. If not, you can go to your Package Manager console and run
This now gives you the provider the Controller template wants while still keeping it as a local (dev) database.