.NET and ASP.NET Core 10 · ASP.NET Core code

Read configuration

Read a value from appsettings.json or an environment variable.

var connection = builder.Configuration["ConnectionStrings:Default"];

Official .NET and ASP.NET Core 10 documentation

More asp.net core code commands

All asp.net core code commands · .NET and ASP.NET Core 10 cheatsheet

Was this page helpful?