Occasionally, you might need to perform custom logic before or after a map occurs. These should be a rarity, as it's more obvious to do this work outside of AutoMapper. You can create global before/after map actions:
Mapper.Initialize(cfg => { cfg.CreateMap
Or you can create before/after map callbacks during mapping:
int i = 10;Mapper.Map
The latter configuration is helpful when you need contextual information fed into before/after map actions.