AutoMapper Extension initialize the IoC container

Jun 28, 2013 at 12:53 PM
Edited Jun 28, 2013 at 12: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.
Coordinator
Jun 28, 2013 at 1: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?
Thanks!
Jun 28, 2013 at 2: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.