From d112adc1f257b780f992b09c8e7f709ee4f0cbee Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Fri, 6 Jun 2014 11:26:50 -0700 Subject: [PATCH] Fix breaking changes from MVC --- src/MusicStore.Spa/Infrastructure/BaseController.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/MusicStore.Spa/Infrastructure/BaseController.cs b/src/MusicStore.Spa/Infrastructure/BaseController.cs index 47247d03a6..525cba2033 100644 --- a/src/MusicStore.Spa/Infrastructure/BaseController.cs +++ b/src/MusicStore.Spa/Infrastructure/BaseController.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Routing; namespace Microsoft.AspNet.Mvc { @@ -39,8 +40,12 @@ namespace Microsoft.AspNet.Mvc { LazyInitializer.EnsureInitialized(ref _modelBinder, ref _modelBinderInitialized, ref _modelBinderInitLocker, () => { - var requestContext = new RequestContext(Context, ActionContext.RouteValues); - _compositeValueProvider = new CompositeValueProvider(_valueProviderFactories.Select(vpf => vpf.GetValueProvider(requestContext))); + var routeContext = new RouteContext(Context) + { + RouteData = ActionContext.RouteData, + }; + + _compositeValueProvider = new CompositeValueProvider(_valueProviderFactories.Select(vpf => vpf.GetValueProvider(routeContext))); return new CompositeModelBinder(_modelBinders); });