Page 1 of 1

Reset/override automatic caching of metadata

Posted: Wed 05 Jan 2011 15:33
by FritzTheCat
I would like to reset a context that was used to get data from a oracle db so that all the metainformations are read again and data are purged (in the context). Is this something that I can do with EF or the Provider from DevArt or is it magic done in the background that is not ment to be overriden?

Thx for any input
Peter

Posted: Mon 10 Jan 2011 15:14
by AndreyR
If you need to refresh data in the loaded objects you can use the ObjectContext.Refresh method (specify the StoreWins refresh mode).
In case you need to refresh the context itself the simplest way is to dispose it and then create a new instance of the ObjectContext class.