I am using IMapper
which is configured as follows:
var mapperConfig = new MapperConfiguration(cfg => {
cfg.CreateMap<IAitoeRedCell, VigilantSingleProcessViewModel>();
cfg.CreateMap<MailSettingsViewModel1, IEmail>();
});
NInjectKernel.Bind<IMapper>().ToConstant(mapperConfig.CreateMapper());
And this is injected into as follows.
public MailSettingsViewModel(IEmailService emailService, IMapper mapper) {...}
But now for unit tests I see on the net that pple are refering to IMappingEngine
.
I have a few questions.
What is the namespace of
IMappingEngine
?I checked out the following namespaces, but I did not find it.
using AutoMapper; using AutoMapper.Configuration; using AutoMapper.Configuration.Conventions; using AutoMapper.Execution; using AutoMapper.Mappers; using AutoMapper.QueryableExtensions; using AutoMapper.QueryableExtensions.Impl;
Am I missing some other nuget package? I found only one - AutoMapper :(
More importantly I want to know differences and which to use when? Can someone please share links with some simple code samples.