What is the difference between automapper.extensions.microsoft.dependencyinjection and automapper nuget packages?

Viewed 2090

I found two nuget packages for integration mapper in my .net core 3.1 project and I only use automapper.extensions.microsoft.dependencyinjection and it works, and I see a another approach with the AutoMapper Nuget , and in first one I saw dependencies of AutoMapper, but in my example it works without this.

2 Answers

The NuGet package AutoMapper.Extensions.Microsoft.DependencyInjection will also load the dependend packages (listed under dependencies) into your project.

It is the same as if you would manually add

  • AutoMapper
  • Microsoft.Extensions.DependencyInjection.Abstractions
  • AutoMapper.Extensions.Microsoft.DependencyInjection

to your project.

when we use Automapper extension , then we need to register the dependency in startup file as well.

Related