Web API complex parameter properties are all null

前端 未结 18 1543
长情又很酷
长情又很酷 2020-11-30 04:18

I have a Web API service call that updates a user\'s preferences. Unfortunately when I call this POST method from a jQuery ajax call, the request parameter object\'s proper

18条回答
  •  醉酒成梦
    2020-11-30 05:03

    I know, this is a bit late, but I just ran into the same issue. @blorkfish's answer worked for me as well, but led me to a different solution. One of the parts of my complex object lacked a parameter-less constructor. After adding this constructor, both Put and Post requests began working as expected.

提交回复
热议问题