code首先迁移 - 如何显示挂起模式的改变? [英] Code first migrations - how to display pending model changes?
本文介绍了code首先迁移 - 如何显示挂起模式的改变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用code首先迁移。有没有一种方法,以显示软件包管理器控制台挂起的模式的改变之前,我脚手架新的迁移?
I'm using code first migrations. Is there a way to display pending model changes in package manager console before I scaffold a new migration?
推荐答案
如果您使用更新,数据库-Script
实体框架生成的SQL脚本,而不是执行挂起更改直接。
If you use Update-Database -Script
entity framework generates a SQL script rather than executing the pending changes directly.
您可以使用包管理器可获得有关的EntityFramework GET-帮助的EntityFramework
You can get help on the EntityFramework in the package manager using get-help EntityFramework
和你可以使用以下的更新,数据库命令的帮助:
And you can get help on the Update-Database command using the following:
GET-帮助更新,数据库
GET-帮助更新,数据库-detailed
GET-帮助更新,数据库-full
这篇关于code首先迁移 - 如何显示挂起模式的改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文