I converted my web application from preview 3 to beta1 and am now trying to put the new functions of the framework to use. One of them is ModelBinding.
For this particular situation I created a class that is (for now) just a container of a bunch of simple-type properties. If I create a form with a bunch of textboxes, I want the framework to fill a SearchBag instance with these fields.
- Where do I start? Is this behaviour out of the box or do I implement a SearchBagBinder? I had a quick look at the IModelBinder but can't quite wrap my head around it and the DefaultModelBinder source doesn't make me any the wiser.
- What is this ModelBindingContext?
- How do I access my form fields?
- What if the values are not passed on by a form but rather by entering a URL directly?
- Where do I find up-to-date information on this (most blogs are outdated)? I thought I read a post by Phil at one time, but I can't seem to find it no more.
Any help is appreciated.