I have three tables: Context, Component and ComponentContext. The ComponentContext table links the Component and Context into an N:M relationship.
I'm working on a C# project which imports a bunch of data into these tables. It uses an Entity model and as a result, I only see an Component entity and a Context entity within my code.
Now, using only these entities, is it possible to delete the contents of all three tables? I could, for example use this:
foreach (var obj in CPE.Context) { CPE.DeleteObject(obj); }
To delete all Context records. (CPE is the Context entity model.) This fails, of course, since Context has relations to Components. So I need another method.
(And yes, I can use SQL to do the same but It's for a "Proof of Usability" for the entity model so I want to do it as much within the model as possible.)