Using Profiles in Automapper to map the same types with different logic

Profiles are for segregating common configuration applied across several type maps, like formatting. However, type maps are still global. You’re better off creating separate Configuration objects, and creating a separate MappingEngine for each. The Mapper class is merely a static facade over each of those, with some lifecycle management.

Leave a Comment