AutoMapper in ASP.Net Core 2.0

user7100073 picture user7100073 · Sep 19, 2017 · Viewed 9.1k times · Source

Does someone know if there's any way to use AutoMapper with ASP.Net Core 2.0? There's no extension for IServiceCollection.

And optional question, does anyone tryed to work with AutoMapper with .Net Framework 4.7 or .Net Standard 2.0?

Answer

user7100073 picture user7100073 · Sep 19, 2017

It turns out you need to add both:
- AutoMapper
- AutoMapper.Extensions.Microsoft.DependencyInjection
or only the 2nd one (which have dependency to the 1st one).