Create a gist now

Instantly share code, notes, and snippets.

@yuta-kaseda /AsTransient Secret
Last active Apr 21, 2017

What would you like to do?
//case1
Container.Bind<BindClass>().AsTransient();
Container.Bind<BindClass>().AsTransient();
//multiple error
Container.Resolve<BindClass>();
//OK
Container.ResolveAll<BindClass>();
//case2
Container.Bind<BindClass>().WithId(1).AsTransient();
Container.Bind<BindClass>().WithId(2).AsTransient();
//ok
Container.ResolveId<BindClass>(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment