我在实体框架版本5中遇到代码首次迁移时遇到的奇怪问题.有时Update-Database由于挂起的更改而失败,但Add-Migration命令仅生成迁移,其中包含上次迁移中已包含的数据库更改且数据库是最新的.因此,我希望新的迁移是空的.
Update-Database
Add-Migration
如何Add-Migration检测到哪些更改?它似乎没有使用数据库作为源.
.net c# database entity-framework ef-code-first
.net ×1
c# ×1
database ×1
ef-code-first ×1
entity-framework ×1