Attaching and detaching entities from context correctly in EF4.1
问题 I am trying to implement caching mechanism for entities. And to use the entities correctly and seamlessly with the caching i need to detach the entity from the current context before i put it in a cache and attach it back the the new context when i get it from the cache. (My context lifetime is per http request) The requirements are that - All the navigational properties that are associated with it (which i have already populated) should not be removed when the entity is detached. I can