Skip to content

Instantly share code, notes, and snippets.

@jbogard
Created July 18, 2016 19:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbogard/26c1f63b5efb8ff008850587b295a3a7 to your computer and use it in GitHub Desktop.
Save jbogard/26c1f63b5efb8ff008850587b295a3a7 to your computer and use it in GitHub Desktop.
var container = new Container();
var config = new MapperConfiguration(cfg => {
// config here, add profiles etc.
});
container.RegisterSingleton<IConfigurationProvider>(config);
container.Register<IMapper>(() => new Mapper(container.Resolve<IConfigurationProvider>(), type => container.Resolve(type));
@fernandosfigueiredo
Copy link

fernandosfigueiredo commented Sep 1, 2017

wich version of SimpleInjector you are using?
In version 3.2.7 dont have this method: container.Resolve
Has another way?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment