Created
February 1, 2020 18:51
-
-
Save CoreProgramm/56a40eb9259abbf34032663cf1947535 to your computer and use it in GitHub Desktop.
Difference between AddSingleton vs AddScoped vs AddTransient in asp.net core
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 ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllersWithViews(); | |
services.AddMvc(); | |
services.AddTransient<IMobileService, MobileService>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment