小编car*_*ion的帖子

Posting Nested Collection to Web API

I'm trying to post a complex type object to web api. On the web api side, when method recieves the object parameter, every property is set properly except a collection that is derived from ICollection.

Here is my sample classes:

public class MyClass
{
    private int id;

    public int Id
    {
        get { return id; }
        set { id = value; }
    }

    private MyCollection<string> collection;

    public MyCollection<string> Collection
    {
        get { return collection; }
        set { collection = value; …
Run Code Online (Sandbox Code Playgroud)

c# binding icollection asp.net-web-api

4
推荐指数
1
解决办法
3459
查看次数

标签 统计

asp.net-web-api ×1

binding ×1

c# ×1

icollection ×1