Reputation: 104821
Is there a way to delete an entity by its EntityKey witout loading it?
Upvotes: 4
Views: 998
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
Reputation: 3921
This will help you: http://sqlskills.com/BLOGS/BOBB/post/Entity-Framework-Beta3-Deleting-without-fetching.aspx
Upvotes: 1