Created
August 15, 2021 01:43
-
-
Save gaufung/053bf6dd9770e0b7dd82d7ff7e79b8a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureService(IServiceCollection services) | |
{ | |
service.AddSingleton<MyService>(sp => { | |
ILoggerFactory loggerFactory = sp.GetService<ILoggerFactory>(); | |
MyService service = new MyServcie(loggerFactory); | |
return service; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment