Breeze item's arent loaded right with virtual properties on the domain class -



Breeze item's arent loaded right with virtual properties on the domain class -

i have on domain class virtual icollection property. if leave property, items generated breeze after query don't have entityaspect attribut. if delete virtual, works.

example:

this products poco :

public class product : baseentity { [required] public string name { get; set; } public decimal cost { get; set; } public string description { get; set; } // if leave property this, works fine. public icollection<category> categories { get; set; } //if this, entities loaded breeze, got no entity aspect property public virtual icollection<category> categories { get; set; } }

make sure disabled proxy creation , disabled lazy loading in dbcontext. can either this:

this.configuration.lazyloadingenabled = false; this.configuration.proxycreationenabled = false;

or can utilize efcontextprovider access dbcontext this:

var contextprovider = new efcontextprovider<mydbcontext>(); contextprovider.context //this dbcontext

breeze

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -