开发者

Entity Framework: can't compile after changing FKs to "delete cascade"

开发者 https://www.devze.com 2023-03-08 06:02 出处:网络
I have a lookup table with 2 columns, each column is a FK. Let\'s say those columns are CustomerID and ProductID. Everything was ok u开发者_如何学Pythonntil I changed those FKs to have the \"delete ru

I have a lookup table with 2 columns, each column is a FK. Let's say those columns are CustomerID and ProductID. Everything was ok u开发者_如何学Pythonntil I changed those FKs to have the "delete rule" and "update rule" on both to Cascade. No I cannot build the project. Any solutions?


If you changed the rule in SQL Server, you have to update your model from database.

If you changed the rule in the .edmx file manually, first make sure that you still have well-formed xml and then re-generate the DDL and redeploy the database.

0

精彩评论

暂无评论...
验证码 换一张
取 消