I am relatively new to AutoMapper (but love it already) and have been declaring my mapping profiles using Mapper.Map using a static method called in Global.asax.cs.
I hope you do not. The method is Mapper.Map
used to perform actual matching between instances of an object. What you should do in Global.asax.cs
defines your mappings using a static method Mapper.CreateMap
.
, IMapperEngine
, . hardcoding Mapper.Map
, , unit test. .
. Mapper.Engine
, , , IMapperEngine.Map
, Mapper.Engine.Map
.