AppSettings.json is used in .NET and .NET Core projects for configuration.
Our appsettings.json course focuses on how to get a value, and some of the areas where it can be used in an ASP.NET Core C# app. These include:
IConfiguration
IWebHostEnvironment
to read the environment name.ILogger
These examples will allow you to view the samples that are used within the course.
This is the software that will need to be installed onto your machine.
These are the steps to get the application working.
RoundTheCode.AppSettings .02ConnectionString/Database
of the repo. You can use either the .bak
or .bacpac
file to import it.You are now ready to go.
There are four parts to the appsettings.json course, and each part has a different solution to view the code.
IConfiguration
in ASP.NET Core, open RoundTheCode.AppSettings .01ReadValue.sln
RoundTheCode.AppSettings .02ConnectionString.sln
RoundTheCode.AppSettings .03Environment.sln
ILogger
, open RoundTheCode.AppSettings .04Logging.sln
Inside any of the solutions, start the project in Visual Studio, and they will run at https://localhost:9902
.