According to the MVC mapping question, is there a way to create model bindings for generic types in the ASP.NET Web API?
If so, how would I handle type checking and instantiation in the binder? Suppose model binding refers to URL parameters, consider that you have
[ModelBinder(typeof(MyTypeModelBinder))] public class MyType<T> {
AND
public class MyTypeModelBinder : IModelBinder { public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext) {
source share