'AutoMapper.AutoMapperMappingException: 'Missing type map configuration or unsupported mapping.'

The code in my interactor

public List<EmployeeDto> GetEmployee(int key)
{
var employeesOutput = _employeeRepository.GetEmployee(key);
var mappedEmployeesOutput = _mapper.Map<List<EmployeeDto>>(employeesOutput);
return mappedEmployeesOutput;
}

Im returning the code back to the controller and showing the following error

i want to access a single employee in the repository and return it to the controller.

the error is AutoMapper.AutoMapperMappingException: 'Missing type map configuration or unsupported mapping.'



Sources

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

Source: Stack Overflow

Solution Source