You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
DI will resolve this more specific dependency instead of the unbound generic. However, it still checks the unbound generic dependency chain (dependencies of EntityResourceService<>). If MyModelService has no dependency on IEntityRepository<>, but DefaultEntityRepository<> has dependencies that are not in the container it will fail with
Unable to resolve service for type ... while attempting to activate ...DefaultEntityRepository
If the dependencies are added, it works, but resolves the MyModelService not the EntityResourceService<>. Hopefully this makes sense.
The text was updated successfully, but these errors were encountered:
dotnet --version: 1.0.0
framework: netcoreapp1.0
Suppose an app uses the following dependency chain:
And a library may be used to define some "default" services like so:
Now suppose the application injects a specific service that implements
IResourceService<MyModel>
.DI will resolve this more specific dependency instead of the unbound generic. However, it still checks the unbound generic dependency chain (dependencies of
EntityResourceService<>
). IfMyModelService
has no dependency onIEntityRepository<>
, butDefaultEntityRepository<>
has dependencies that are not in the container it will fail withIf the dependencies are added, it works, but resolves the
MyModelService
not theEntityResourceService<>
. Hopefully this makes sense.The text was updated successfully, but these errors were encountered: