Delete Entity in Entity Framework 4.0
I have two tables without any cascade deleting, the two tables have 1 to many relation ship.
When loading the entities that map that tables , and try to delete the parent entity then 2 scenarios will execute:
- The e开发者_StackOverflow社区ntity framework will force the cascade delete when both entities were loaded.
- If the child entity was not loaded it will raise an exception
How to guarantee that the entity framework will execute the second scenario always???? What I mean, I need to raise an exception without force delete cascade behavior.
thank you so much.
精彩评论