March 23, 2017

AutoMapper - dotnet core package a day - 4


This post is part of a series, dotnet core package a day, where for 15 days I will be posting an overview of an awesome OSS dotnet package that already has support for dotnet core. In this post we will cover 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? AutoMapper uses a fluent configuration API to define an object-object mapping strategy and a convention-based matching algorithm to match up source to destination values. Currently, AutoMapper is designed for model projection scenarios to flatten complex object models to DTOs and other simple objects, whose design is better suited for serialization, communication, messaging, or simply an anti-corruption layer between the domain and application layer.

AutoMapper is the most widely used object mapping library for the dotnet platform. It has a rather impressive 7,716,215 downloads on NuGet, 1,030,380 of those downloads are for a single version (v3.3.1). It averages 3,403 downloads a day. The publish of it's v5.0.2 release to NuGet on the 7th July 2016 added support for dotnet core (.net standard 1.1 & .net standard 1.3).

AutoMapper development is led by Jimmy Bogard, there have been a number of contributions from the wider community as well, at the time of writing 80+ individuals have commited to AutoMapper.

I've used AutoMapper on a lot of projects now and as long as I've favoured convention over configuraton it has been an awesome library to use. I've also used Mapster and had good experiences with that too.

What the community thinks

tweet tweet tweet tweet


Massive thanks to Jimmy and the community.


Mapster is a good alternative that also has dotnet core (.net standard 1.3) support.

A fast, fun and stimulating object to object mapper. Kind of like AutoMapper, just simpler and way, way faster*.

*AutoMapper has made significant performance improvements since it's v4.2.1 release. Benchmarks, More Benchmarks


If you don't want to keep checking back for more posts in this series but do want an email in your inbox then you can subscribe to the mailing list below.

Tags: dotnet core automapper