paint-brush
.NET Core Configuration is Simpleby@igorlopushko
1,741 reads
1,741 reads

.NET Core Configuration is Simple

by Igor Lopushko4mNovember 4th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Let’s assume we want to create a simple Web API project. We need to add a connection string section to the **appsetting.json** file which is a default setup for the.NET Core Web API application. By default, appsettings.json and appsettings.Development.json files are created for the new project. It means that you could follow the pattern to create a configuration file for different environments and switch between them. Sometimes it happens that you need to add a configuration file with the custom name or path. It can be easily done in Program.cs file. You just need to call ConifugureAppConfiguration() method for the instance of IHostBuilder.

Company Mentioned

Mention Thumbnail
featured image - .NET Core Configuration is Simple
Igor Lopushko HackerNoon profile picture
Igor Lopushko

Igor Lopushko

@igorlopushko

Programmer, Architect, Teacher

Learn More
LEARN MORE ABOUT @IGORLOPUSHKO'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Igor Lopushko HackerNoon profile picture
Igor Lopushko@igorlopushko
Programmer, Architect, Teacher

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite