'The string argument 'migrationId' can

2020-05-08 07:12发布

Blocked on a weird error. I am working in an asp.net core web application, and using EF core 1.1.0 in it.

EF database migration is throwing error 'The string argument 'migrationId' cannot be empty.' when trying to execute below command

dbcontext.Database.Migrate();

Performed accepted answer from the the link but it did not solved my issue.

Uninstall donet 2.0.0, installed 1.1.0 and restarted PC. Still i am getting the same error.

Can anyone please help me on this.

2条回答
仙女界的扛把子
2楼-- · 2020-05-08 07:28

When you have MigrationID column with in __EFMigrationsHistory table is empty you will have above issue. Make sure you delete this record manually and rerun the command. Please find screen shot for the same.

enter image description here

查看更多
相关推荐>>
3楼-- · 2020-05-08 07:47

I had solved my issue.

Just deleted development database and executed migration on start.

It working now perfectly.

查看更多
登录 后发表回答