Reputation: 31
I'm using the core version pf asp.net the first time and have a few questions about the built in DI container - Yes I know, there are a lot of other Implementations for this task. I just want to be sure.
Multiple implementations of an interface
As far as I know it is not possible to register more than one implementation of the same interface.
True?
Named registration
There is no possibility (like the @qualifier in spring (java)) to register a instance / implementation with a given name.
True?
Scopes
There is no scope that has a longer lifetime than request (except singleton) No view / usecase / custom scope (like in java cdi / spring orchestra).
True?
Any answers would be appreciated
And... yes, I read the docs which are quite..... release candidate like ;-)
Upvotes: 3
Views: 814
Reputation: 3327
You've provided a correct answer to all your questions. The good news is the two ones can be fixed using custom implementations such as autofac. Do you've any idea about this? How to register different registrations to services (IServicesCollection) for multiple usages of the same middlewares in asp.net core?
Upvotes: 1