Posts

Showing posts with the label appsettings

Appsettings.json Connection String

Image
Appsettings.json Connection String . In asp.net core the configuration system is very flexible, and the connection string could be stored in appsettings.json, an environment variable,. This is my default connection string in secrets.json }} it should look like this: Core Read Connection String from AppSettings.json file from www.getsetsolution.com Let’s imagine an application that uses the following appsettings.json. In have already shown you how you can access connection string in dbcontext.cs file from appsettings.json in asp.net core 6 application using c#.net. But as we move towards.net core, the old style of reading values doesn’t work here.