由于我计划在将来的应用程序中使用基于sql Server Compact文件的数据库,所以我尝试使用sql Server Compact 4.0重现教程的示例.我安装了NuGet软件包“EntityFramework.sqlServerCompact”和“Micrososft sql Server Compact Edition”.显然这会导致在app.config中提供一个新的提供者条目:
<providers> <provider invariantName="System.Data.sqlServerCe.4.0" type="System.Data.Entity.sqlServerCompact.sqlCeProviderServices,EntityFramework.sqlServerCompact" /> </providers>
Migrations is enabled for context ‘DataModelContext’ but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables,for example by running the ‘Update-Database’ command from the Package Manager Console.
当我运行更新数据库我收到消息:
No pending explicit migrations.
Applying automatic migration: 201310311356014_AutomaticMigration.
Running Seed method.
解决方法
原文地址:https://www.jb51.cc/mssql/81086.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。