Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Disable Dynamic Proxy in EF #3065


User avatar
0
bilalhaidar created

Hello, I am trying to turn off dynamic proxy creation inside the application DbContext as follows:

public OnlineSystemsDbContext()
            : base("Default")
        {
            // Turn off Dynamic Proxy
            Configuration.ProxyCreationEnabled = false;
        }

For some reason I keep on getting those long IDs attached to entities.

Do you override this setting somewhere inside the framework?

Thanks


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We don't change this value in any other place. Maybe, you can find more information on the internet.

    By the way, this action will also disable lazy loading and it might cause some problems in the project.

  • User Avatar
    0
    bilalhaidar created

    Oh I see! Thanks a lot.