WCF Service 如何向客户端传输复杂类型(尚未成功, 只是记录一下不可行的方案, 以后再了解).

1. 用ComplexObject. 

class CompanyComplexInfo : ComplexObject

{

      List<Department> DepList {set; get;}

      List<Employee> EmpList{set; get;}
}

好像 ComplexObject 不支持 List, 自动生成代码中没有 DepList 属性 和 EmpList 属性.

 

2. 用 shared.cs

客户端是有了这2个属性了, 但是值总是 null.

 

3. 说明网上有一些是通过修改 edxm的文件, 但是这种做法应该是Code-First吧? 

posted @ 2012-08-13 17:35  Ken-Cai  阅读(6194)  评论(0编辑  收藏  举报