Unable to resolve service for type while attempting to activate

I have registered the service in startup.cs' ConfigureServices method. But the problem persists.