2019-03-22 15:53:23 +08:00
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
|
|
|
|
namespace CmdjyHisFront
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 网站配置
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class WebSettings
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取配置的值
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static string GetValue(string key) {
|
|
|
|
|
var val = ConfigurationManager.AppSettings[key];
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 自动升级数据库
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static bool AutoMigrations {
|
|
|
|
|
get {
|
|
|
|
|
var val = GetValue("AutoMigrations");
|
|
|
|
|
if(bool.TryParse(val,out bool v)) {
|
|
|
|
|
return v;
|
|
|
|
|
}
|
2019-03-25 16:32:58 +08:00
|
|
|
|
return false;
|
2019-03-22 15:53:23 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|