用字典参数法Asp.Net的Web API [英] Method with Dictionary Parameter in Asp.Net Web API

查看:98
本文介绍了用字典参数法Asp.Net的Web API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要做一个GET请求到包含字典作为参数的方法。我通过浏览但无法找到如何我可以把字典的任何类型的信息,所以我要求打我的方法。方法签名是像下面

I need to make a GET request to a method that contains Dictionary as a parameter. I browse through but could not find any kinds of information about how I could send Dictionary so my request hit to my method. Method signature is as like as below

public void AddItems(Dictionary<string,object> Items)

最好的问候,

凯末尔

推荐答案

你看过<一个href=\"http://www.hanselman.com/blog/ASPNETWireFormatForModelBindingToArraysListsCollectionsDictionaries.aspx\">ASP.NET电线格式模型绑定到数组,列表,集合,字典

这篇关于用字典参数法Asp.Net的Web API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆