I've got a legacy project that originally used Web API and was ported to Dotnet core making use of microsoft's WebApiCompatShim.
I've got an API method that looks like this public List<MyModel> GetMyModel(int? size = null).
HybridModelBinding will throw an error on this line because it can't find a model of type Nullable<int>. The last resort to set the value of hydratedModel using Activator.CreateInstance also returns null.
Is there a way I can tell hybrid model binder to ignore WebApi controllers? I actually only need the library for MVC controllers.
I've got a legacy project that originally used Web API and was ported to Dotnet core making use of microsoft's WebApiCompatShim.
I've got an API method that looks like this
public List<MyModel> GetMyModel(int? size = null)
.HybridModelBinding will throw an error on this line because it can't find a model of type
Nullable<int>
. The last resort to set the value ofhydratedModel
usingActivator.CreateInstance
also returns null.Is there a way I can tell hybrid model binder to ignore WebApi controllers? I actually only need the library for MVC controllers.