You can check the DataContext class.
First check the ObjectTrackingEnabled property on the DataContext . If it returns false, then the object is not tracked by the context.
Then call the GetChangeSet method on the DataContext . From there, compare the links provided by the Deletes , Updates and Inserts properties against your object.
If the link is found in any of these lists, then your object is tracked by this list, and you can go from there.
source share