I know that we can use this in razor asp.net mvc 4
@Html.EditorFor(model => model.Parameters)
But what if we want to render the parameters ordered by parameters.displayOrder
I have tried with
@Html.EditorFor(model => model.Parameters.OrderBy(p => p.displayOrder))
but it is not possible to do operations to the model inside razor.
Do you have any ideas?
Turns out in the view we can do this
Thus the child collection will be ordered