Dotnet
Authentication and Authorization - Registration Part 2

Exercise - Auto Mapper DI

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

I finished! On to the next chapter

Exercise: AutoMapper Dependency Injection

In the Conduit.Repositories Project we need to inject the Auto Mapper object into the Account Repository Class.

Modify Conduit.Repositories.AccountRepository.cs file
  • Add a private member
    • Type: IMapper
    • Name: Mapper
Modify the Constructor
  • Add parameter
    • Type: IMapper
    • Name: mapper
  • Assign the parameter value to the member

Take note of the upper- and lower-case character difference between the member and the parameter. In the next video I’ll show you my solution to injecting the Auto Mapper object.