Entity Framework The ALTER TABLE statement conflicted with the FOREIGN KEY constraint

后端 未结 11 1984
傲寒
傲寒 2021-02-01 00:34

On updating database in Entity Framework , Code first Migration, I am getting this error:

The ALTER TABLE statement conflicted with the FOREIGN KEY constr

11条回答
  •  無奈伤痛
    2021-02-01 01:14

    Check that there is not existing data in the database that is conflicting with the FK constraint causing the creation to fail.

提交回复
热议问题