I´ve read that proxies are used when wee need to use Lazy Loading and Change Tracking. In other words, to use Lazy Loading I must enable proxies.
So far so good.
the point is that I can use the code bellow to setup the context to not use a proxy and even yet use lazy loading.
ctx = new SchoolEntities();
ctx.ContextOptions.ProxyCreationEnabled = false;
ctx.ContextOptions.LazyLoadingEnabled = true;
Is the ProxyCreationEnabled property related only to change tracking proxy or am I missing something?
Could someone please explain this with some details?
Thanks!
EDIT1
I´m not using POCO/DbContext. I´m using a regular edmx EF model with ObjectContext. I know the importance of proxies for POCO entities regards to change tracking and lazy loading. By why to use Proxies in a regular EDMX model?
EntityObject
is a "legacy entity" :) When do you start to mark it with the[Obsolete]
attribute? – Abscess