c# - WCF ria services return list of complex types -


i have complex type entity

public class complexentity : complexobject { private int _id; private string _name; private int _parentid;  [key] [datamember] public int id { get;set;}  [datamember] public string name {get;set;}  [datamember] public int parentid {get;set;}  } 

and one

[datacontract] public class complexentitieslist : complexobject { [datamember] [include] [association("centities_centity","id","parentid")] public list<compelxentity> list {get;set;}  [key] [datamember] public int id {get;set;}  public int lkentitieslist() { list = new list<lkentity>; } 

and method:

[invoke] public complexentitieslist getps() { return new complexentitieslist() { list = /*..some logic*/}); } 

on server side everything's perfect list comes empty @ client side clues? }

i think include not work wit invoke-operations. take @ this question on silverlight.net , see colin blairs answer. method getps() should return normal collection (aka. list) containing complex objects.

[invoke] public ienumerable<complexentity> getps() {   return new list<complexentity>() { /*..some logic*/}); } 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -