Entity Framework: can't compile after changing FKs to "delete cascade"
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.
精彩评论