Toggling ProxyCreation in EF7 under new configuration

asp.net-core configuration entity-framework entity-framework-core

Question

So in EF6, one could disable proxy creation like so:

this.Configuration.ProxyCreationEnabled = false;

From what I could find, the configuration scheme under EF7 has changed, but I cannot find anything on how to do so. I went through https://docs.efproject.net/en/latest/miscellaneous/configuring-dbcontext.html and even analyzed the DbContextOptionsBuilder object, but cannot find anything on it.

Am I going about ti the wrong way or is there something im missing? Thanks in advance.

1
7
3/25/2016 3:20:01 PM

Accepted Answer

EF7 EF Core 1.0 does not do proxy creation, so accordingly, there is no configuration option for this. See https://github.com/aspnet/EntityFramework/issues/997

9
3/25/2016 9:19:51 PM

Popular Answer

Entity Framework Core 2.1 starts to support Lazy load. Please see: https://docs.microsoft.com/en-us/ef/core/querying/related-data#lazy-loading

Here is recent question with answers from stackoverflow: What is the equivalent of .Configuration.ProxyCreationEnabled in EF Core?



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow