silverlight 4.0 - List of objects always empty when passing to Domain Service method -


i'm pretty @ wits end here. don't understand i'm missing.

here setup:

    [datacontract] public partial class class1 {     [key()]     [datamember]     public string id     {         get; set;     }      ...      [include]     [datamember]     [composition]     [association("fk_class1id", "id", "class1_id")]     public list<class2> pierlist     {         get; set;     }  }  [datacontract] public partial class class2 {     // class has 3 values make key     [key()]     [datamember]     public string class1_id     {         get; set;     }      [key()]     [datamember]     public int xid     {         get; set;     }      [key()]     [datamember]     public int yid     {         get; set;     }      [datamember]     public enumtype type     {         get; set;     }      ... }  [datacontract] public enum enumtype {     [enummember]     val1,     [enummember]     val2,     [enummember]     val3,     [enummember]     val4 } 

in domain service have save method:

[invoke]     public void saveobject(class1 object) { ... } 

when object.itemlist, empty. though set on client, empty when here.

i have downloaded sp1 beta hoping fix problems. didn't. have tried moving list out it's own wrapper class , passing in second parameter (found here). i've tried making dummy methods class2 object i've found suggested in other posts on here.

nothing working , i'm getting frustrated.

any suggestions appreciated. feel i'm making random changes in hopes work.

thanks.

edit: ok, i've gone basics today. here classes:

    public partial class testclass {     [key]     public string id { get; set; }     public string listid { get; set; }     public int x { get; set; }     public int y { get; set; }     public string type { get; set; } }  public partial class testlistclass {     [key]     public string listid { get; set; }      [include]     [composition]     [association("testlistclass_id", "listid", "listid")]     public entityset<testclass> testlist { get; set; } } 

this invoke method works fine, can see properties: public void savetest(testclass tc)

this invoke method doesn't work, testlist null: public void savetest(testlistclass tlc)

i have added insert/update/delete methods both testclass , testlist class.

does know i'm missing?

the blog post here , here think. shows how mark objects pass them on wire.

i have put simple demo app can download here. app shows passing object collection of child objects silverlight client across wire ria domain service.


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) -