Related questions
AddTransient, AddScoped and AddSingleton Services Differences
I want to implement dependency injection (DI) in ASP.NET Core. So after adding this code to ConfigureServices method, both ways work.
What is the difference between the services.AddTransient and service.AddScoped methods in ASP.NET Core?
public void …
How to read AppSettings values from a .json file in ASP.NET Core
I have set up my AppSettings data in file appsettings/Config .json like this:
{
"AppSettings": {
"token": "1234"
}
}
I have searched online on how to read AppSettings values from .json file, but I could not get anything useful.
I tried:
var configuration = …