'The string argument 'migrationId' can

2020-05-08 07:23发布

问题:

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.