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 October 29th, 2014, 08:28 AM
Registered User
 
Join Date: Oct 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Scaffolding

I am creating the Music Store from Jon Galloway MVC 5 book. I have reached page 87 where you execute the scaffolding template. I try to create a scaffold by right clicking on Controller file then selecting "add controller" I then select everything he tell me to however I recieve an error message telling me "Unable to retrieve for 'MvcApplication3.Models.Album'.Using the same DbcompiledModel to create contexts against different types of database servers is not supported. Instead, create a seperate DbCompiledModel for each type of server being used"

Which means I can't complete the scaffolding part of the book. Does anyone know what I need to do to correct this error? Any help would be much appreciated.
 
Old October 31st, 2014, 12:20 AM
Wrox Author
 
Join Date: Oct 2006
Posts: 36
Thanks: 1
Thanked 5 Times in 5 Posts
Default

This can indicate a variety of problems with your database connection. Which version of Visual Studio are you using? In you web.config, what does you data connection look like?

There are a lot of answers on StackOverflow, depending on the specific issue you're hitting: http://stackoverflow.com/questions/1...t-working?lq=1
 
Old October 31st, 2014, 06:07 AM
Registered User
 
Join Date: Oct 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web config

My connection string looks like this.

<add name="MusicStoreEntities" connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf" providerName="System.Data.SqlServerCe.4.0"/>
</connectionStrings>


Do I need to change any of it to maybe to connect to my sql express database.
 
Old October 31st, 2014, 12:19 PM
Registered User
 
Join Date: Oct 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reply

Im using Visual Studio 2012

<connectionStrings>
<add name="MusicStoreEntities" connectionString= "Data Source=C:\Users\Gary\Documents\Visual Studio 2012\Projects\MvcApplication3\MvcApplication3\App_ Data\MvcMusicStore.sdf" providerName="System.Data.SqlServerCe.4.0"/>
</connectionStrings>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Scaffolding problem johnisdumb BOOK: Beginning Ruby on Rails 3 June 19th, 2007 10:41 AM





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