kanayabhattad / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

RegisterWebApiModelBinders has no effect in Web API 2 #484

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Registering Web API 2 model binders using the extension method 
RegisterWebApiModelBinders has no effect. It's missing the required metadata 
needed by AutofacWebApiModelBinderProvider to resolve the model binder.

Instead of using RegisterWebApiModelBinders, one can manually register the 
model binders, using:
builder.RegisterType<RequestContextModelBinder>().AsModelBinderForTypes(typeof(R
equestContext));

Not sure if it is possible to make RegisterWebApiModelBinders work, otherwise 
it should probably be deprecated for Web API 2.

Original issue reported on code.google.com by tommyj...@gmail.com on 19 Jan 2014 at 2:15

GoogleCodeExporter commented 8 years ago
Moved issue to GitHub: https://github.com/autofac/Autofac/issues/484

Subsequent issue management will be held there; closing the issue on Google 
Code as "WontFix" because we will handle issue resolution on GitHub.

Original comment by travis.illig on 11 Feb 2014 at 12:00