Use request services instead of application services by default
This commit is contained in:
parent
6aa1f84420
commit
14c43c351d
|
|
@ -70,7 +70,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
|
||||
private static ActionDescriptorsCollection GetAndValidateActionDescriptorsCollection(HttpContext httpContext)
|
||||
{
|
||||
var provider = httpContext.ApplicationServices
|
||||
var provider = httpContext.RequestServices
|
||||
.GetService<IActionDescriptorsCollectionProvider>();
|
||||
var descriptors = provider.ActionDescriptors;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
|
||||
if (formatters == null)
|
||||
{
|
||||
formatters = context.HttpContext.ApplicationServices.GetService<IEnumerable<IInputFormatter>>()
|
||||
.ToArray();
|
||||
formatters = context.HttpContext.RequestServices.GetService<IEnumerable<IInputFormatter>>()
|
||||
.ToArray();
|
||||
|
||||
_formatters = formatters;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue