How can I stop Entity Framework 5 migrations adding dbo. into key names?

前端 未结 4 1118
情深已故
情深已故 2020-12-05 00:32

I started a project using Entity Framework 4.3 Code First with manual migrations and SQL Express 2008 and recently updated to EF5 (in VS 2010) and noticed that now when I ch

4条回答
  •  时光说笑
    2020-12-05 01:22

    This is a fine answer, however, if you're just looking for a 'quick fix' approach, there's this as well EF Migrations DropForeignKey fails when key is in a base class

    Use the DropForeignKey overload which contains the parameters principalName and name -- which in this case means constraint name!

提交回复
热议问题