幽梦紫曦

EF操作数据库的数据迁移

电脑版发表于:2019/10/25 16:00
  1. Enable-Migrations启用数据库迁移。


  2. Enable-Migrations –EnableAutomaticMigrations 启动自动迁移。


  3. Update-Database 更新到数据库。


  4. Add-Migration needname 手动迁移(防止一些数据库丢失的情况,类似做一个日志,方便自己查看)


  5. The EntityFramework package is not installed on project 'WebApplication1'。未应用自动迁移,因为自动迁移会导致数据丢失。


  6. PluralizingTableNameConvention

关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢