ef core don´t use ASPNETCORE_ENVIRONMENT during update-database

后端 未结 4 764
情话喂你
情话喂你 2020-12-04 17:40

I use visual studio to update all my environments with a certain migration. It had worked fine using the command below.

update-database -Migration initMigrat         


        
4条回答
  •  醉话见心
    2020-12-04 18:13

    According to EntityFrameworkCore#6846 the correct solution is to use the --environment option, the dotnet ef commands do not respect ASPNETCORE_ENVIRONMENT

    dotnet ef database update --environment Production
    

提交回复
热议问题