本文介绍了EF附加迁移产生空迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我加入到我的模型的新表:
I added into my model a new table:
public DbSet<ReturnedTransactions> ReturnedTransactions { get; set; }我希望我的迁移生成的表给我,所以我所做的:
And i want my migrations to generate that table for me, so i did:
PM> Add-migration returnedTransactions和它产生的
public partial class returnedTransactions : DbMigration { public override void Up() { } public override void Down() { } }如何强制这件事能够生成正确的code给我吗?
How do i force this thing to generate proper code for me?
推荐答案我只是有这个问题,我说 - 强制到Add-迁移命令和它的工作。
I just had this problem and I added -Force to the Add-Migration command and it worked.
更多推荐
EF附加迁移产生空迁移
发布评论