Last active
February 1, 2020 18:38
-
-
Save CoreProgramm/1eead0b1375d00d5f62890b9dfaa4133 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.AddScoped<IMobileService, MobileService>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment