在 Silverlight Ria 服务中传递自定义类型列表
我必须读取 csv 文件。 从 csv 文件,我必须创建一个列表列表 然后返回给调用方法。
你有其他选择吗? CustomClass 还有一个属性列表。在 silverlight 方面它始终为空。你能告诉我解决方案是什么吗?
i have to read csv file.
from csv file, i have to create a List list
And then return it to the calling method.
do you recommend any other alternative? also CustomClass has a property List. It's always null on the silverlight side. Can you tell me what the solution is?
解决方案是对类的属性使用 [Ininclude] 和 [Associate] 属性。
另外,为了读取数据,我们可以从 ria 服务返回 IEnumerable 类型,例如 list、ilist 到 silverlight 应用程序
The solution is to use [Include] and [Associate] attributes for properties of the class.
Also to read data, we can return an IEnumerable type e.g. list, ilist from our ria service to the silverlight application