Entity Framework: Add-Migration fails with Unable to update database

后端 未结 4 948
别那么骄傲
别那么骄傲 2021-02-03 11:24

I have been using Entity Framework (5.0) for a while now in a project (ASP.NET MVC in VS2012 Express). Right now, though, I am no longer able to add migrations.

         


        
4条回答
  •  甜味超标
    2021-02-03 11:45

    This worked for me:

    update-database -targetmigration:"0" -force -verbose
    add-migration Initial
    update-database
    

提交回复
热议问题