.NET/C#
Tuesday, November 20, 2018
.NET Core: Get IConfiguration object from appsettings.json without injection
IConfiguration Configuration = (IConfiguration)
new
ConfigurationBuilder().AddJsonFile(
"appsettings.json"
).Build();
var
connStr = Configuration[
"ConnectionString:Default"
];
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment