Posting array of objects with MVC Web API

前端 未结 3 587
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 15:44

I have a basic post operation that works on a single object of RecordIem. What I would like to do is do the same action but in bulk by posting an array of reque

3条回答
  •  长情又很酷
    2020-12-02 16:11

    It's important that your json contains the request parameter name. A other note: you have to post it as an array.

    Your json would look like this:

    {
        "request": [
            {
                "Id": "...",
                "System": 1,
                ...
            },
            { ... }
        ]
    }
    

提交回复
热议问题