I have an action method that takes in two different objects.
I am posting JSON to the action using jquery, to do this I put all the properties i want to map to my two objec开发者_如何学Pythonts in the one Json object. This works correctly and maps to the two objects in my action!
I want to be able to pass Json and map to a list of objects? is this possible in asp .net MVC?
Thanks
UPDATE: Looks like ActionFilters are the way to go here! found this post.
I think you should map to an object[]
instead of a List<object>
. This should map when adding an array of JSON objects as argument to your function.
精彩评论