I assume your question is related to the web API (not applicable to ASP.net vnext). The basis for the assumption is the method that you provided in the example, as well as the old question.
public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext) { actionContext.Request.Content.ReadAsStringAsync().ContinueWith(deserialize); bindingContext.Model = your model; // You can return from static method or you can pass bindingContext to static method and set model over there. return true; }
Now about your confusion.
In the Web API, you can register a lot of modelbinder (some of them are registered by default), and some of them are registered and all implement IModelBinder. Therefore, when he tries to analyze the request data, he goes to many connecting devices, and when you return true to BindModel, he will stop there, and the whole module module will be discarded after that.
More detailed information can be found here. (In this you can see the section "Model Associations") http://www.asp.net/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api
source share