Пример #1
0
        public List <string> LoadDataTypeList(DatabaseConfig config = null)
        {
            var typeList = new List <string>();

            // 生成SQL
            var sql = new ZinSQL("game_data");

            sql.AddField("DataType");
            sql.Config = config;

            var dataList = MySqlServer.Instance().GetList(sql);

            foreach (var data in dataList)
            {
                typeList.Add((string)data[0]);
            }
            return(typeList);
        }
Пример #2
0
        public MySqlConnection GetConnection(DatabaseConfig config)
        {
            var connStr = (config != null) ? MySqlServer.Instance().GetConnStr(config) : _connStr;

            return(new MySqlConnection(connStr));
        }