I'm using the following syntax in my asp.net core startup class to configure automapper:
services.AddAutoMapper(c => c.AllowNullCollections = true, AppDomain.CurrentDomain.GetAssemblies());
I'd like to be able to compile the mappings at startup.
According to the Automapper docs, I should be able to do so via:
var configuration = new MapperConfiguration(cfg => {});
configuration.CompileMappings();
How do I get access to the mapping configuration using AddServices syntax?