Created
February 1, 2020 01:45
-
-
Save PradeepLoganathan/b6d9a430ee8218318cc6f2311234d871 to your computer and use it in GitHub Desktop.
Registering Services in the DI container
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
private static void RegisterServices() | |
{ | |
var services = new ServiceCollection(); | |
services.AddSingleton<ICustomer, Customer>(); | |
services.AddSingleton<ConsoleApplication>(); | |
_serviceProvider = services.BuildServiceProvider(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment