【发布时间】:2014-05-13 22:29:49
【问题描述】:
我想通过 GET 将相同类型的项目列表发送到我的 WCF 服务。 例如:
MySite.com?MyService.svc\MyMethod?Id=1&Id=2&Id=3 .....
还有我的方法
[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Json)]
public void MyMethod( ???????? )
{
//here i want to get the list of all the id's i've sent
}
或者可能有另一种发送此类数据的方式(我的意思是,具有随机长度的 ID 的“数组”
统一更新: 我已经尝试过 List 和字符串 [] (无论如何,它是字符串,但是)但是异常说:'type 'System.String[]' is not convertible by 'QueryStringConverter'。'
【问题讨论】:
-
我已经尝试了 List
和 string [] (无论如何,它是字符串,但是)但是异常说:'type 'System.String[]' is not convertible by ' QueryStringConverter'.'