// ASP.Net Core DI scenario public static void PopulateRegistry(ContainerConfiguration containerConfig, ServiceRegistry registry) { var assemblies = AssemblyFetcher.GetApplicationRelevantAssemblies(containerConfig); registry.Scan( scanner => { assemblies.ForEach(scanner.Assembly); scanner.LookForRegistries(); }); if (containerConfig.InitializeAutoMapper) { AutoMapperInitializer.InitializeAutoMapper(registry, assemblies); } }