
DeductionItems and match The cascading deletes The main table, code execution will throw The relationship could not be changed because one or more of The foreign - key properties is a non - nullable
If you remove the traversal can be deleted from the table, why is this so
CodePudding user response:
Why traverse from the table can lead to failure of cascade deletion, if have to do is remove the traverse from the table, or from the table traversed removed manuallyCodePudding user response:
Because DeductionItems is NULLCodePudding user response:
DeductionItems is not NULL, but instead of NULL can be deleted successfullyCodePudding user response:
May be the result of the foreach delay theCodePudding user response:
Is not the reason why the foreach, I was the only by the navigation field out of the table data is so (ps: var test=a. d. eductionItems)CodePudding user response:
For you to try ah,The foreach, is can't modify the current entity,
CodePudding user response:
As long as I'm through navigation attribute from the table out will lead to can't delete