AutoMapper 16.0.0

AutoMapper

CI NuGet Documentation Status

What is AutoMapper?

AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write, so why not invent a tool to do it for us?

This is the main repository for AutoMapper, but there's more:

How do I get started?

First, configure AutoMapper to know what types you want to map, in the startup of your application:

var configuration = new MapperConfiguration(cfg => 
{
    cfg.CreateMap<Foo, FooDto>();
    cfg.CreateMap<Bar, BarDto>();
}, loggerFactory);

// or more typically, using IServiceCollection
services.AddAutoMapper(cfg => 
{
    cfg.CreateMap<Foo, FooDto>();
    cfg.CreateMap<Bar, BarDto>();
});

// only during development, validate your mappings; remove it before release
#if DEBUG
configuration.AssertConfigurationIsValid();
#endif
// use DI (http://docs.automapper.io/en/latest/Dependency-injection.html) or create the mapper yourself
var mapper = configuration.CreateMapper();

Then in your application code, execute the mappings:

var fooDto = mapper.Map<FooDto>(foo);
var barDto = mapper.Map<BarDto>(bar);

Check out the getting started guide. When you're done there, the wiki goes in to the nitty-gritty details. If you have questions, you can post them to Stack Overflow.

Where can I get it?

First, install NuGet. Then, install AutoMapper from the package manager console:

PM> Install-Package AutoMapper

Or from the .NET CLI as:

dotnet add package AutoMapper

Do you have an issue?

You might want to know exactly what your mapping does at runtime.

If you're still running into problems, file an issue above.

If you are a paying customer, you can contact support via your account.

How do I set the license key?

You can set the license key when registering AutoMapper:

services.AddAutoMapper(cfg => 
{
    cfg.LicenseKey = "<license key here>";
})

You can register for your license key at AutoMapper.io

Showing the top 20 packages that depend on AutoMapper.

Packages Downloads
Abp.AutoMapper
Abp.AutoMapper
29
KubernetesClient.Models
Client library for the Kubernetes open source container orchestrator.
25
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
23
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
21
Duende.IdentityServer.EntityFramework.Storage
EntityFramework persistence layer for Duende IdentityServer
20
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
19
IdentityServer4.EntityFramework.Storage
EntityFramework persistence layer for IdentityServer4
19
Duende.IdentityServer.EntityFramework.Storage
EntityFramework persistence layer for Duende IdentityServer
18
AutoMapper.Collection
Collection updating support for AutoMapper
16
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
16
Duende.IdentityServer.EntityFramework.Storage
EntityFramework persistence layer for Duende IdentityServer
15
Abp.AutoMapper
Abp.AutoMapper
15
Abp.AutoMapper
AutoMapper integration package for ASP.NET Boilerplate.
14
Duende.IdentityServer.EntityFramework.Storage
EntityFramework persistence layer for Duende IdentityServer
14
IdentityServer4.EntityFramework.Storage
EntityFramework persistence layer for IdentityServer4
14
KubernetesClient.Models
Client library for the Kubernetes open source container orchestrator.
14
Abp.AutoMapper
Abp.AutoMapper
13

Version Downloads Last updated
16.0.0 15 12/12/2025
16.0.0-beta-1 9 12/24/2025
15.1.0 9 12/12/2025
15.0.1 9 12/11/2025
15.0.0 14 12/10/2025
14.0.0 13 12/10/2025
13.0.1 9 12/13/2025
12.0.1 10 12/13/2025
12.0.0 12 12/12/2025
11.0.1 7 12/09/2025
11.0.0 11 12/13/2025
10.1.1 8 12/09/2025
10.0.0 10 12/11/2025
9.0.0 7 12/13/2025
8.1.1 8 12/13/2025
8.1.0 12 12/11/2025
8.0.0 13 12/13/2025
7.0.1 13 12/10/2025
7.0.0-alpha-0001 9 12/13/2025
6.2.2 9 12/13/2025
6.2.1 8 12/13/2025
6.2.0 11 12/10/2025
6.1.1 10 12/15/2025
6.1.0 9 12/13/2025
6.0.2 14 12/13/2025
5.2.0 10 12/10/2025
5.1.1 11 12/13/2025
5.0.2 8 12/10/2025
5.0.0-beta-1 7 12/11/2025
4.2.1 8 12/11/2025
4.2.0 11 12/11/2025
4.1.1 10 12/12/2025
4.0.4 11 12/13/2025
4.0.0-alpha1 7 12/11/2025
3.3.1 13 12/10/2025
3.3.0 13 12/13/2025
3.2.1 14 12/09/2025
3.1.1 12 12/11/2025
3.1.0 8 12/13/2025
3.0.0 9 12/10/2025
2.2.1 11 12/13/2025
2.2.0 6 12/13/2025
2.1.267 10 12/13/2025
2.1.266 11 12/13/2025
2.1.265 12 12/13/2025
2.1.262 10 12/09/2025
2.1.1 14 12/12/2025
2.0.0 9 12/11/2025
1.1.2 11 12/10/2025
1.1.0.118 10 12/11/2025