using Microsoft.Extensions.Configuration; using System; namespace Core.Util {
/// <summary> /// Profile help class /// </summary> public static class ConfigHelper {
private static IConfiguration _config; private static object _lock = new object(
); public static IConfiguration Configuration { get { if (_config == null) {
lock (_lock) { if (_config == null) { var builder = new ConfigurationBuilder() .
SetBasePath(AppContext.BaseDirectory) .AddJsonFile("appsettings.json"); _config
= builder.Build(); } } } return _config; } set { _config = value; } } ///
<summary> /// from AppSettings obtain key Value of /// </summary> /// <param
name="key">key</param> /// <returns></returns> public static string GetValue(
string key) { return Configuration[key]; } /// <summary> /// Get connection string ///
</summary> /// <param name="nameOfCon"> Connection string name </param> /// <returns></returns>
public static string GetConnectionString(string nameOfCon) { return
Configuration.GetConnectionString(nameOfCon); } } }

Technology
©2019-2020 Toolsou All rights reserved,
The project followed for a year , The customer finally said no vue vue-element-admin Summary of the project pytorch of ResNet18( Yes cifar10 The accuracy of data classification is achieved 94%)( Essence )2020 year 7 month 13 day Wechat applet Inter communication page Science fiction comes true !“ Trisomy ” Found out ElementUI In the select Of label value ToastUtils Use of Redis Counter High concurrency applications golang One line of code converts the slice into a semicolon separated string ( Essence )2020 year 7 month 12 day webpack Use of common plug-ins