We can inject dependency thanks to: services.AddSingleton() in .NET Core. Is there any aim of creating a special class(Singleton) with special body (private constructor, static GetInstance() etc.) Shouldn't we just use the services.AddSingleton() with a "normal" class?
Aucun commentaire:
Enregistrer un commentaire