Outline

Demo: Configuring HttpContext for Dependency Injection

In the Conduit.Api Project, modify Startup.cs

Within the ConfigureServices method find the line where we configured AutoMapper and the following line of after just after

services.AddHttpContextAccessor();

In the Conduit.Repositories Project
  • Inject IHttpContextAccessor
  • Over over the error
    • Select [Potential Fix]
    • Select [using Microsfot.AspNetCore.Http]
    • If necessary, install any necessary NuGet Packages that are suggested

In the next demo we'll finalize the GetLoggedUser method so we can test the endpoint.

 

I finished! On to the next chapter