'Using appsettings.json values in Automapper configuration

Is there a way to get a value from appsettings.json when mapping two objects in Automapper?

public class MapperProfile : Profile
{
     public MapperProfile()
     {
          CreateMap<Employee, EmployeeDto>()
             .ForMember(employeeDto => employeeDto.Picture, employee => employee.MapFrom(employee => $"{someValueFromAppSettings}{employee.Picture}"
     }
}

I need to append a path before the picture's name on mapping but I can't seem to figure it out how and whether it is even possible with Automapper.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source