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;
                }
                return false;
            }
        }
    }
}