AutoMapper / AutoMapper.Extensions.Microsoft.DependencyInjection

MIT License
258 stars 79 forks source link

Missing extension #143

Closed BanallyMe closed 3 years ago

BanallyMe commented 3 years ago

There is an overload of AddAutoMapper using a configurationAction with an IMapperConfiguration argument, but no overload using a configurationAction with an IServiceProvider argument.

Doing

services.AddAutoMapper((sp, cfg) => {...});

will currently result in a compiler error as there are two overloads with a second params argument. You would have to do something like

services.AddAutoMapper((sp, cfg) => {...}, Array.Empty<Type>());

which isn't pretty intuitive.

lbargaoanu commented 3 years ago

The idea used to be that you had to pass assemblies to scan, that was a main point of the package, but maybe not so much anymore :)

github-actions[bot] commented 3 years ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.