Invalid object name 'dbo.__MigrationHistory' using Database.Create; EF6.02 when connection string is passed in

后端 未结 4 444
故里飘歌
故里飘歌 2020-12-10 23:46

I experience an error when trying to create a database using the following code. Note the problem does not happen if the connection string is not passed in. Also the problem

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 00:17

    I faced the same issue. It means that EF is not able to find the __Migration history table. also note for some reason it has to be dbo.__MigrationHistory (note dbo). Ensure that you have run "update-database" atleast once before running the Context

提交回复
热议问题