79153413

Date: 2024-11-03 19:01:22
Score: 1.5
Natty:
Report link

So I may be wrong on this, but it seems that you are registering your service incorrectly. According to the AddSingleton docs, you have set up the generic parameters backwards. It should be the type you want to add and then the implementation of that type.

AddSingleton docs for <Type, Type> generic parameters.

For example, instead of: services.AddSingleton<ISingletonLoggerHelper, LoggerHelper>();, it should be: services.AddSingleton<LoggerHelper, ISingletonLoggerHelper>();. Hopefully this helps.

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Christian Marcellino