您的位置:首页 > 博客中心 > 数据库 >

在创建数据库连接时的错误提示

时间:2022-03-10 17:36

在学习Mvc MusicStore 过程当中,遇到在添加StoreManagerController时出现错误,显示Unable to retreive metadata for ‘MvcMovie.Models.Movie‘. 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.

可以将Web.config里的

providerName="System.Data.SqlServerCe.4.0"

改成

providerName="System.Data.SqlClient"

这样就不会出现提示错误了。虽然这样生成解决方案可以生成成功,但是在调试的时候,又会出现错误,方法:只要把更改的地方在改过来就可以了。虽然这个方法不是很好,但是足以可以通过这段教程了

在创建数据库连接时的错误提示,布布扣,bubuko.com

热门排行

今日推荐

热门手游