I am trying to delete three related objects on one submit. Delete fails on one of the child objects, because of foreign key contraint with another table, It deletes one (the parent) but not the two child objects. All in one SubmitChanges().
I even used the TransactionScope, still same thing. So here is the scenario:
I have an object called Page which has a collection of objects called Webinars. There is another object Called Product which is one to one with Webinar.
Here is what I do:
What happens is, the webinar is gone, and tho other two stay in the database.
The reason it fails is because the Page record is refenced somewhere else. So what I want to know is why when one of them fails, the webinar still get deleted? Shouldn't it be all or none?
I also tried this:
using (TransactionScope ts = new TransactionScope())
View Complete Post