Posts by Leandro Battochio • 111 points
1 post
-
1
votes1
answer45
viewsA: .NET Core - Class configured in container with Addsingleton() needs to be a Singleton?
For the Bar class to behave like Singleton just use the method AddSingleton when configuring API services. You don’t need to create Getinstance in the private class or constructs this is…