我有一个复杂类型的实体。
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;}
}
还有另一个
[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>;
}
还有一种方法:
[Invoke]
public ComplexEntitiesList GetPS()
{
return new ComplexEntitiesList() { List = /*..some logic*/});
}
在服务器端一切都很完美,但是在客户端列表为空。有什么线索吗?