Created
July 20, 2016 14:33
-
-
Save jbogard/ac5d48395d6d547fed392244282719be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void AddAutoMapper(this IServiceCollection services) | |
{ | |
services.AddAutoMapper(DependencyContext.Default); | |
} | |
public static void AddAutoMapper(this IServiceCollection services, DependencyContext dependencyContext) | |
{ | |
services.AddAutoMapper(dependencyContext.RuntimeLibraries | |
.SelectMany(lib => lib.GetDefaultAssemblyNames(dependencyContext).Select(Assembly.Load))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think the line 9 should call Initalize.AddAutoMapperClasses instead! Am I wrong? You're passing it a
IEnumerable<Assembly>