Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

AutoMapper

> 编程语言
Open source

A convention-based object-object mapper in .NET.

10.2K stars0 likes1 views
WebsiteGitHub

About

A convention-based object-object mapper in .NET.

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:

  • Collection Extensions
  • Expression Mapping
  • EF6 Extensions
  • IDataReader/Record Extensions
  • Enum Extensions

How do I get started?

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

…

Then in your application code, execute the mappings:

csharp
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:

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

You can register for your license key at AutoMapper.io

Issues· 14 open

View all issuesOpen on GitHub
  • #4659

    License key validation: handle common key problems (whitespace, truncation, client platforms) in AutoMapper and MediatR

    Updated Sep 24, 2026
  • #4662

    Blazor WASM: PlatformNotSupportedException inside the validation result is logged as a critical signature error

    Updated Sep 24, 2026
  • #4661

    Detect truncated or malformed license keys and log a clear message

    Updated Sep 24, 2026
  • #4660

    Strip all whitespace from the license key

    Updated Sep 24, 2026
  • #4657

    Registration order causes `ResolutionContext.OverTypeDepth` to access `Context.Items` in AutoMapper 16.2.0

    Updated Sep 19, 2026
  • #4649

    Add env var license instructions to readme

    Updated Sep 9, 2026
  • #4656

    Re-evaluate the AutoMapper.Internal surface

    Internal refactoringUpdated Sep 4, 2026
  • #4654

    CheckForCycles removes the type map from typeMapsPath while its members are still being iterated

    Updated Sep 4, 2026
  • #4653

    Execution plans are cached per type pair but bake in member-specific state

    Updated Sep 4, 2026
  • #4647

    .NET Matrix

    Updated Jul 31, 2026

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言