I have a problem with EF5 DbContext when changing the configuration after using it. I am using POCO T4 template. Here is the scenario:
- I query a set in my context and get dynamic proxy objects with their relations
I modify the configuration of the context to disable dynamic proxies and lazy loading like this:
context.Configuration.ProxyCreationEnabled = false; context.Configuration.LazyLoadingEnabled = false;
I then query again on a set and get the same kind of results with proxies and relations.
What do I need to do to take the configuration into account after the context had been initialized? Is it possible?
Thanks in advance!