I have some code that is similar to what is below. Basically it represents getting data from a web service and converting it into client side objects.
void Main
So I figured something that seems to work.
If I add these two mappings:
Mapper.CreateMap<SomethingFromWebService, Something>();
Mapper.CreateMap<SomethingFromWebService, ISomething>().As<Something>();
then it works as I want.
I have not been able to find any documentation on the 'As' method (try googling for that! :), but it seems to be a mapping redirection.
For example: For this Mapping (ISomething
) resolve it As
a Something
.