For a single entitiy this is relatively easy to do: find the CacheEntry for the entity (renamed to StateEntry in more recent versions which may or may not be in the build you are working with), call Delete on it, and then call AcceptChanges. This will cause it to be removed from the cache but that change to be marked as accepted so that a later call to SaveChanges won't try to delete the entry from the database.
That said, I'm not sure the scenario where you are concerned about the need to unhook the entity from change tracking and things like that. In most of the scenarios I've looked at, once the entity is remoted the object on the other side is going to be unhooked already (because it's a copy reconstituted from what ever remoting format). Could you give me more info about the scenario you are having trouble with
|