I'm using a legacy database that has some cyclic references. When I consume my Ria service from a SL4 client. (generated entities through my ORM mapper) I get the following error:
There was an error while trying to serialize parameter http://tempuri.org/:GetPublicationPagesResult. The InnerException message was 'Object graph for type 'xxx.Entities.TblPublicationPage' contains cycles and cannot be serialized if reference tracking is disabled.
[Query]
public IQueryable<TblPublicationPage> GetPublicationPages(int publicationId)
{
return this.PublicationLogic.Value.GetPublicationPages(publicationId);
}
I know how to enable it for plain WCF through CyclicReferencesAware attribute or IsRefence=true. But I can't figure out how to do this with WCF Ria Services.