diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/Controller.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/Controller.cs index 57518191a3..677e1a7dd6 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/Controller.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/Controller.cs @@ -1756,9 +1756,7 @@ namespace Microsoft.AspNet.Mvc { throw new ArgumentNullException(nameof(model)); } - - var modelExplorer = MetadataProvider.GetModelExplorerForType(model.GetType(), model); - + var modelName = prefix ?? string.Empty; // Clear ModelStateDictionary entries for the model so that it will be re-validated.