No initial create with Entity Framework migrations

后端 未结 6 1990
梦如初夏
梦如初夏 2021-01-30 09:13

I\'m trying to get Entity framework migrations working. I\'ve enabled code first migrations, its created a migrations folder, config file and the mig history table, but no initi

6条回答
  •  天命终不由人
    2021-01-30 09:55

    Not sure it's the same but I had a similar issue. I think my problem was related to the fact that I dont use a connections string from the config file to get my connection string.

    Fiddling with the start up project in the solution and also the projet combo in the Package Manager Console I was able to generate that first migration.

    Also make shure you have a connections string with the name of your dbContext class so the Package Manager can find it.

提交回复
热议问题