This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 318
Add an ability to bind same interface to several implementations #228
Comments
+1 |
2 similar comments
+1 |
+1 |
Note this would also give us named options back for free :) |
Nothing's free -- just prepaid. :) |
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.
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");
The text was updated successfully, but these errors were encountered: