ModelBindingContext ModelName

Can someone explain where ModelName is populated?

Look in the MSDN documentation and do not explain here. I create a custom mediator and inside it I get null for the following: var result = bindingContext.ModelName);

+3
source share
1 answer

The ModelBindingContext object is created and populated by those who call the BindModel () method. If the model is included as an argument in your action method, this is done using ControllerActionInvoker.GetParameterValue (), and the ModelName property will be set to the parameter name (if not overridden [Bind (Prefix = ...)]).

UpdateModel(), ModelBindingContext UpdateModel(). ModelName , UpdateModel().

+2

Source: https://habr.com/ru/post/1738558/


All Articles