Created
February 1, 2020 16:58
-
-
Save CoreProgramm/2b0a2f492d40e1c4a255ae4b5c9d8397 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.AddSingleton<IMobileService, MobileService>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment