Shimmy Weitzhandler
Shimmy Weitzhandler

Reputation: 104821

Is there a way to delete an entity by its EntityKey witout loading it?

Is there a way to delete an entity by its EntityKey witout loading it?

Upvotes: 4

Views: 998

Answers (2)

Alex James
Alex James

Reputation: 20924

The link Tamir has works, but it uses an approach that the Entity Framework team no longer recommends.

Check out this tip which is closer to the right way to do it. And also covers the gotchas in more depth. (Dislaimer: I would say that I wrote the tip!)

Hope this helps

Alex

Program Manager Entity Framework Team.

Upvotes: 1

Related Questions