This project is read-only.

AutoMapper Extension initialize the IoC container

Jun 28, 2013 at 1:53 PM
Edited Jun 28, 2013 at 1:59 PM
In the AutoMapper extension when using a IoC container, would be great that the extension initialize the AutoMapper with that container:
Mapper.Initialize(x =>
                x.ConstructServicesUsing(type => container.Resolve(type));
Is there a way to workaround this right now? My custom AutoMapper Resolvers use dependency injection.
Jun 28, 2013 at 2:49 PM
I honestly don't have experience using a container with AutoMapper, but this looks like a great feature to implement. Can you add this suggestion to the issues list?
Jun 28, 2013 at 3:29 PM
Looking at code, I think is quite simple to implement it.

In the AutoMapper extension, if you have an instance of the container, then call the ConstructServicesUsing method.