How to do Model Binding with Jquery Ajax

你离开我真会死。 提交于 2019-12-04 07:54:23

You need to:

  1. Make the property names in data match the argument/property of bound type names.
  2. Always supply a value for all non-nullable arguments/properties of bound type.

Number 2 is the big one in terms of why binding to person can behave differently than specifying individual action arguments for each property. If you have a type with a non-nullable property called "Foo", then failing to supply a foo item in your form will prevent binding.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!