pass array of an object to webapi

前端 未结 3 1259
轮回少年
轮回少年 2020-12-10 15:06

I have a .net mvc 4 webapi project that I\'m trying to pass an array of an object to a method on my controller.

I\'ve found some examples here on SO that talk about

3条回答
  •  半阙折子戏
    2020-12-10 15:48

    I created a custom model binder, the FieldValueModelBinder class, which can effectively pass any object containing nested array or generic list types of data with query strings having field-name pairs without imbedding any JSON and XML structures. The model binder can resolve all issues discussed above. Since this question was extended by the question ID 19302078, you can see details of my answer in that thread.

提交回复
热议问题