Reacting to hosting API changes
This commit is contained in:
parent
28561e9924
commit
e447546e4e
|
|
@ -12,7 +12,7 @@ namespace ControllersFromServicesClassLibrary
|
|||
|
||||
public QueryValueService(IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_context = httpContextAccessor.Value;
|
||||
_context = httpContextAccessor.HttpContext;
|
||||
}
|
||||
|
||||
public string GetValue()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace RequestServicesWebSite
|
|||
// This service can only be instantiated by a request-scoped container
|
||||
public RequestIdService(IServiceProvider services, IHttpContextAccessor contextAccessor)
|
||||
{
|
||||
if (contextAccessor.Value.RequestServices != services)
|
||||
if (contextAccessor.HttpContext.RequestServices != services)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue