The FormDataCollectionExtensions.ReadAs() extension methods should have an additional overload that accepts an HttpActionContext.
The current versions create a new HttpConfiguration() and synthesize a new HttpActionContext() just to be able to use the model binders. But this approach loses all user customization such as ModelBinders and ValueProviders.
This issue was reported by a customer wanting to treat date parsing in a culture specific way. Even though he could create a ModelBinder to do this, the FormDataCollection.ReadAs() was not able to use it.
The current versions create a new HttpConfiguration() and synthesize a new HttpActionContext() just to be able to use the model binders. But this approach loses all user customization such as ModelBinders and ValueProviders.
This issue was reported by a customer wanting to treat date parsing in a culture specific way. Even though he could create a ModelBinder to do this, the FormDataCollection.ReadAs() was not able to use it.