Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Add an ability to bind same interface to several implementations #228

Closed
vadim7bc opened this issue May 6, 2015 · 6 comments
Closed

Add an ability to bind same interface to several implementations #228

vadim7bc opened this issue May 6, 2015 · 6 comments

Comments

@vadim7bc
Copy link

vadim7bc commented May 6, 2015

It can be similar to the Ninject Named binding:

serviceCollection.AddScoped<IRepository, DefaultRepository>("Default");
serviceCollection.AddScoped<IRepository, AnotherRepository>("Another");
...
var repository = provider.GetService<IRepository>("Default");

@wholroyd
Copy link

+1

2 similar comments
@brockallen
Copy link

+1

@MikhailNazarov
Copy link

+1

@HaoK
Copy link
Member

HaoK commented Jul 24, 2015

Note this would also give us named options back for free :)

@brockallen
Copy link

Nothing's free -- just prepaid. :)

@Eilon
Copy link
Member

Eilon commented Jul 27, 2015

The DI system in DNX is designed around supporting the most common set of features so that other DI systems can be adapted to it. If you have a need for named bindings we recommend using a DI system that supports it and integrating it with DNX.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants