All the unit tests are now passing but I haven't looked at the samples yet. This is a summary of the changes I've made:
- Updated the ModelBinders to work with the new method signature for BindModel. This was probably the biggest change.
- BinaryResult has been removed. The framework's FileResult does the same thing.
- Removed the entire metadata API. The framework now has an almost identical API built in.
- The ModelStateToTempData filter no longer has to copy ModelState items to an intermediate serializable dictionary for storage in TempData as ModelStateDictionary and ModelState are now serializable.
- Removed CastleSimpleBinder. This was a left over from the days before the DefaultModelBinder.
- Marked more of the FormHelper classes as obsolete. Following the RC release of MvcContrib, these classes will be removed from the project.
- Other minor fixes
Is it still worth keeping the RescueAttribute? It has a few additional features over the HandleErrorAttribute, but is largely a duplication.
The AbstractParameterBinder and its subclasses don't use the ValueProvider API for retrieving values from the Request, rather they use the HttpContext directly. I think it'd be worth switching to using the ValueProvider, but this will be a breaking
change. Specifically, it will no longer be possible to supply the Request Store in the attribute declaration, but it will instead be necessary to provide a custom ValueProvider at the controller level if you want to extract values from a non-default location
A couple of observations about the RC that I think are worth noting:
- AuthorizationFilters now execute before ModelBinders. This is a good thing as it fixes a possible security hole, but could have some implications if you're relying on when filter/binder execution occurs.
- The ViewLocationCache from Preview 5 has been re-introduced (it was missing from Beta 1) and no longer appears to be broken.
- The DefaultViewEngine has been removed and its methods are now available on the ViewEngineCollection object.
- The ValueProvider is now just a dictionary which makes testing Model Binders very easy.
- IBuildManager is still internal :(
- If you're upgrading from an older release and want to use codebehind-less strongly typed views, you will need to add the PageParserFilter to the <pages> section of your web.config:
<pages pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35"></pages>