public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { CheckPropertyFilter(bindingContext); ExtensibleModelBindingContext newBindingContext = CreateNewBindingContext(bindingContext, bindingContext.ModelName); IExtensibleModelBinder binder = Providers.GetBinder(controllerContext, newBindingContext); if (binder == null && !String.IsNullOrEmpty(bindingContext.ModelName) && bindingContext.FallbackToEmptyPrefix && bindingContext.ModelMetadata.IsComplexType) { // fallback to empty prefix? newBindingContext = CreateNewBindingContext(bindingContext, String.Empty /* modelName */); binder = Providers.GetBinder(controllerContext, newBindingContext); } if (binder != null) { bool boundSuccessfully = binder.BindModel(controllerContext, newBindingContext); if (boundSuccessfully) { // run validation and return the model newBindingContext.ValidationNode.Validate(controllerContext, null /* parentNode */); return(newBindingContext.Model); } } return(null); // something went wrong }