Is ProxyCreationEnabled = false is equal to AsNoTracking() in Entity framework?

asp.net-web-api c# entity-framework-6 linq performance

Question

Is ProxyCreationEnabled = false is equal to AsNoTracking() in Entity framework?

And we can use AsNoTracking() in table level. but how to use AsNoTracking() in stored procedures.

1
2
11/15/2017 7:41:26 AM

Popular Answer

Proxies and tracking are two different, but combinable concepts.

Proxies generate a derived class at runtime for advanced features like lazy loading, property changed, etc. While proxies are usually coupled with a tracking context, the don't necessarily have to.

Tracking indicates whether or not your open context saves a reference to the returned object and is able to detect changes to it. It can do this with or without proxies. Without proxies the context "simply compares" all tracked references to their initial state when you call Save().

3
11/15/2017 8:25:31 AM


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