8

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.

Shadow3188
  • 265
  • 2
  • 7

2 Answers2

9

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

natemcmaster
  • 25,673
  • 6
  • 78
  • 100
0

Entity Framework Core 2.1 starts to support Lazy load. Please see: https://learn.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?

Robin Ding
  • 741
  • 6
  • 9