At the boundaries of an application it is often nice to map objects from one form to another. The most common example is mapping domain entities to view models, or mapping to dtos for network transfer.
Automapper is a library for removing the duplication from object-object mapping code by mapping by convention. When the conventions don't map the way you want you can explicitly map properties.
After using AutoMapper on a couple of projects I have stopped using it. The problem is that the convention based mappings introduce annoying bugs when property names change or the object graph changes. When a change breaks the convention it results in a runtime exception. Very annoying.
AutoMapper has a validation feature that you can place in your test project. You execute it using
Mapper.AssertConfigurationIsValid()
. This will provide a useful warning if, for any destination property, there is no matching source property (and no explicit map).