Okay, lets say I have a URL like so, which is mapped via HTTP verb GET to the controller action I have below:
GET /foo/bar?sort=asc&r=true
<
The model binder matches the parameters it gets from the view to the model you have in the action by the Names, so if they won't match the binding will not work.
options you got:
so basically, You can't do exactly what you want.
Update:
You wrote in a comment that the properties CAN match the parameters names, so instead of write custom attributes that maybe will succeeded to do the binding, just write a ViewModel (The VM fromMVC...) to adjust the url parameters names.
Writing custom model binder is not recommended by the MVC team:
In general, we recommend folks don’t write custom model binders because they’re difficult to get right and they’re rarely needed
from here