From eae9d3a951d88ea005338fbed07ba59c3a370482 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 18 Mar 2014 11:39:12 -0700 Subject: [PATCH] Update GenericModelBinder.BindModel to use correct overload of Activator.CreateInstance --- .../Binders/GenericModelBinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs index fa5cf1f78f..1e88f41bd9 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding Type binderType = ResolveBinderType(bindingContext.ModelType); if (binderType != null) { - var binder = _activator.CreateInstance(); + var binder = (IModelBinder)_activator.CreateInstance(binderType); return binder.BindModel(bindingContext); }