예제 #1
0
        /// <summary>
        /// 获取连接字符串
        /// </summary>
        public string GetConnection()
        {
            switch (DbType)
            {
            case DataBaseType.MsSQL:
                return
                    ($"Data Source = {Ip.Trim()},{Port}; User ID = {Account }; Password = { Password}");

            case DataBaseType.MySQL:
                return($"Server={Ip.Trim()};Port={Port};Uid={Account};Pwd={Password}");

            default:
                return
                    ($"Data Source = {Ip.Trim()},{Port}; User ID = {Account }; Password = { Password}");
            }
        }