What are the conventions for mapping collections to default model binding?

In MVC 2, what is the default display behavior for the binder. I saw him once on a blog, but can't find him again.

In particular, with regard to list items.

From memory it is something like this: {ModelName}[{id}].{Proptery}

Any help would be greatly appreciated, especially the online article that links to this.

+3
source share
2 answers

Are you talking about Model.MyCollection [i] .SpecificProperty?

Here is a good link from the person himself (Phil Haack) talking about binding to a list of complex types:

http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx

+4
source

Source: https://habr.com/ru/post/1758839/


All Articles