Linq cache and disposing datacontext?

You might be holding a reference to one of the entities. They internally point to the DataContext. If that is the case, you are looking how to change the context of the entities, regardless of what you are trying to free with dispose.

Disclaimer: I don't know if dispose is supposed to clear the tracked entities list, but that would be awfull if you hold a reference to those entities.

Entities don't actually hold a reference to the DataContext - check the .designer. Cs file your . Dbml generates: they are just INotifyProperty* implementers with Table and Column attributes and some partial methods for extension points.

– Simon Buchan Jan 6 '10 at 9:16.

They internally point to the DataContext. If that is the case, you are looking how to change the context of the entities, regardless of what you are trying to free with dispose. Disclaimer: I don't know if dispose is supposed to clear the tracked entities list, but that would be awfull if you hold a reference to those entities.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions