WCF Ria Services and Cyclic references -


i'm using legacy database has cyclic references. when consume ria service sl4 client. (generated entities through orm mapper) following error:

there error while trying serialize parameter http://tempuri.org/:getpublicationpagesresult. innerexception message 'object graph type 'xxx.entities.tblpublicationpage' contains cycles , cannot serialized if reference tracking disabled.

[query] public iqueryable<tblpublicationpage> getpublicationpages(int publicationid) {     return this.publicationlogic.value.getpublicationpages(publicationid); } 

i know how enable plain wcf through cyclicreferencesaware attribute or isrefence=true. can't figure out how wcf ria services.

i understand wcf ria services better, tried fix in plain wcf , added metadataclass generated entities:

[datacontract(isreference = true)] [dataservicekey("publicationpageid")] [debuggerdisplay("publicationpageid: {publicationpageid}")] [metadatatype(typeof(tblpublicationpagemetadata))] public partial class tblpublicationpage {     internal sealed class tblpublicationpagemetadata     {         [datamember]         public int publicationpageid { get; set; }     } } 

only disadvantages @ point have decorate every property in metadata class [datamember] attribute...


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -