mutex
mutex

Reputation: 7738

EntityCollection: Can I Clear() without first Load()ing?

Is it possible to clear an EntityCollection without having to Load() it?

I have code in place that uses stub entities to add new entities to an EntityCollection without having load the actual Entity I'm adding, but is there some equivalent to this when Clear()ing an EntityCollection?

Upvotes: 1

Views: 301

Answers (1)

Craig Stuntz
Craig Stuntz

Reputation: 126587

No, not exactly. If you have a cascade on the FK, however, you can delete the master record without first loading the details.

Upvotes: 1

Related Questions