Reset/override automatic caching of metadata

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
FritzTheCat
Posts: 2
Joined: Fri 03 Dec 2010 13:33

Reset/override automatic caching of metadata

Post by FritzTheCat » Wed 05 Jan 2011 15:33

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

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 10 Jan 2011 15:14

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.

Post Reply