using System.ComponentModel.DataAnnotations; using ChangkeTec.SDMS.Model.Enums; using CK.SCP.Utils; namespace ChangkeTec.SDMS.Model { public class DbSetting { public DbSetting() { #region ly 2019-05-05 数据库类型 = DataBaseType.SQLServer.ToString(); 服务器地址 = "127.0.0.1"; 端口 = "1433"; 数据库名称 = "SDMS"; 用户名 = "sa"; 密码 = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; #endregion } public DbSetting(DataBaseType type) { 数据库类型 = type.ToString(); 服务器地址 = "127.0.0.1"; 端口 = "1433"; 数据库名称 = "SDMS"; 用户名 = "sa"; 密码 = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; } [StringLength(50)] public string 数据库类型 { get; set; } //= Enums.DataBaseType.SQLServer.ToString(); [StringLength(50)] public string 服务器地址 { get; set; } //= "127.0.0.1"; [StringLength(50)] public string 端口 { get; set; } //= "1433"; [StringLength(50)] public string 数据库名称 { get; set; } //= "DB_NAME"; [StringLength(50)] public string 用户名 { get; set; } //= "sa"; [StringLength(50)] public string 密码 { get; set; } //= "5E0AFEB85CA001A3371A9F19E7EC4DFF"; //public override string ToString() //{ // return EntitiesHelper.GetPropertiesString(this); //} } }