Reacting to hosting API changes

This commit is contained in:
Praburaj 2015-03-02 12:03:01 -08:00
parent 28561e9924
commit e447546e4e
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ namespace ControllersFromServicesClassLibrary
public QueryValueService(IHttpContextAccessor httpContextAccessor) public QueryValueService(IHttpContextAccessor httpContextAccessor)
{ {
_context = httpContextAccessor.Value; _context = httpContextAccessor.HttpContext;
} }
public string GetValue() public string GetValue()

View File

@ -11,7 +11,7 @@ namespace RequestServicesWebSite
// This service can only be instantiated by a request-scoped container // This service can only be instantiated by a request-scoped container
public RequestIdService(IServiceProvider services, IHttpContextAccessor contextAccessor) public RequestIdService(IServiceProvider services, IHttpContextAccessor contextAccessor)
{ {
if (contextAccessor.Value.RequestServices != services) if (contextAccessor.HttpContext.RequestServices != services)
{ {
throw new InvalidOperationException(); throw new InvalidOperationException();
} }