ASP.NET Dependency Injection Fails to instantiate service
I'm trying to inject a service over which I have no control (hence no use of an interface) and determine why the DI container cannot instantiate the service. This code applies:
I've tried using an
but this check fails when invoked.
How can I determine why the container is not registering a
UsersRepository doesn't get injected into LoginEndpoint when I rely on CTSCore.Security.Users being injected, but when I create in manually, the repo does get injected into the endpoint.I've tried using an
Oakton environment check like this:but this check fails when invoked.
How can I determine why the container is not registering a
CTSCore.Security.Users instance when I can easily do it myself?