Outline

Exercise: Modify ProfilesController

In the Conduit.Api Project

Modify the ProfilesController by adding the following method
  • Name: GetProfileAsync
  • Return Type: IActionResult
  • Parameters: [FromRoute] string userName
Add the following Attributes to the method:

HttpGet("{userName}")

Finally, inject the following:

IProfileRepository

Modify the Startup.cs file

Configure IProfileRepository for Dependency Injection

Hint: Find the line code where we configured IAccountRepository for Dependency Injection

 

I finished! On to the next chapter