Cleanup BindingInfo \ ModelMetadata coalescing in ModelBinderFactory

Fixes #7583
This commit is contained in:
Pranav K 2018-05-07 17:18:20 -07:00
parent 26454fb1da
commit bda5ea9df0
1 changed files with 4 additions and 9 deletions

View File

@ -275,15 +275,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public override IModelBinder CreateBinder(ModelMetadata metadata)
{
return CreateBinder(
metadata,
new BindingInfo()
{
BinderModelName = metadata.BinderModelName,
BinderType = metadata.BinderType,
BindingSource = metadata.BindingSource,
PropertyFilterProvider = metadata.PropertyFilterProvider,
});
var bindingInfo = new BindingInfo();
bindingInfo.TryApplyBindingInfo(metadata);
return CreateBinder(metadata, bindingInfo);
}
public override IModelBinder CreateBinder(ModelMetadata metadata, BindingInfo bindingInfo)