'The string argument 'migrationId' cannot be empty.'

别说谁变了你拦得住时间么 提交于 2020-05-24 05:52:45

问题


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.


回答1:


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.




回答2:


I had solved my issue.

Just deleted development database and executed migration on start.

It working now perfectly.



来源:https://stackoverflow.com/questions/46275929/the-string-argument-migrationid-cannot-be-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!