Dotnet
User Profile

Exercise - Modify ProfilesController

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

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