Closed DemetriouJohn closed 3 years ago
You should inject IConfigurationProvider
where you need it.
One possibility is using a hosted service to run this on startup and inject the mapper configuration into that. I use that frequently for startup tasks.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Using AddAutomapper one needs only to provide assembly location of profiles. But since I have no control and no access over MapperConfiguration, how can one call MapperCongiguration.CompileMappings() ?