You need to access the foreign keys of an object marked as "Remote" for auditing
I am using v1 from EF (.NET 3.5 SP1). I subscribe to the SavingChanges event of the ObjectContext in which I check for deletion for a specific type of object. I need to get the foreign keys of a deleted entity ie EntityKeys of related entities (RelatedEnds), but EntityKeys of related entities are null.
Is there a way to get the foreign keys of an object marked for deletion? Does EF throw an EntityKeys exception of all related elements for an object marked for deletion? If so, is there a way to get foreign keys?
+2
source to share
1 answer
I finally found the answer on the MSDN forums. http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/e4c4739f-731a-491a-a4c9-eb3c91f7c7eb
+1
source to share