[recovery mode] AutoMapper DI- Unity |
var container = new UnityContainer();
container.RegisterMappingProfile();
container.RegisterMapper();
public SomeController(IMappingEngine mapper)
{
_mapper = mapper;
}
public ViewModel SomeAction()
{
return _mapper.Map(dataModel)
}