There are many ways to bind json data sent from a http request to a parameter in action method. The following articles provide in-dept view of these methods:
https://docs.microsoft.com/en-us/aspnet/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api
And a helpful summary
https://blogs.msdn.microsoft.com/jmstall/2012/04/20/how-to-bind-to-custom-objects-in-action-signatures-in-mvcwebapi/
https://stackoverflow.com/questions/14498148/how-do-i-make-my-list-based-editor-template-bind-properly-for-a-post-action
https://docs.microsoft.com/en-us/aspnet/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api
And a helpful summary
https://blogs.msdn.microsoft.com/jmstall/2012/04/20/how-to-bind-to-custom-objects-in-action-signatures-in-mvcwebapi/
https://stackoverflow.com/questions/14498148/how-do-i-make-my-list-based-editor-template-bind-properly-for-a-post-action
No comments:
Post a Comment