wcf data services - WCF + Entity Framework CodeFirst = DynamicProxies exception? -


i'm trying out ef codefirst ctp 5, , using wcf data services. i'm getting error internal server error. type 'system.data.entity.dynamicproxies.person_c321d7a37002a1b42c3cbaecc27983d77f6b7fcc3f837175b2cbb55cca66af55' not complex type or entity type.

if use edmx-generated person off db created cf, have no issue. in reading up, seems lazy loading screwing things up, , previous ef versions have let me turn off proxy generation option flag that's not present in dbcontext. there way set lazyloading false, doesn't apparently turn off proxy generation.

thanks.

here's can in ef code first ctp5:

((iobjectcontextadapter)context).objectcontext.contextoptions.proxycreationenabled = false; 

alternatively, bug in wcf data services in vs 2010 rtm. can used ctp1 of wcf data services has this issue fixed.

hope helps.
thanks
pratik


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -