MVC – Create a separate DbCompiledModel – Fix

When using a CE database for constructing MVC 3 Controllers you get the following error if using providerName="System.Data.SqlServerCe.4.0".

“Unable to retreive metadata for ‘X.Y.Z’. Using the same DbCompiledModel to create contexts against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type of server being used”

Don’t know whether its fixed in 4 but change the provider to providerName="System.Data.SqlClient" so the wizard can run and change it back again when its finished

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.