C# 查询数据库

public static string GetLightweightEngineStrategy()
        {
            try
            {
                string sql = "select * from core_arg where ArgGroup = 'WebConfig' and ArgText = 'LightweightEngineStrategy'";
                var result = MySqlDataHelper.ExecuteDataRow(sql);
                if (result != null)
                {
                    string agrValue = result["ArgValue"].ToString();
                    return agrValue;
                }
                else
                {
                    return "";
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog("GetLightweightEngineStrategy", ex);
                throw ex;
            }
        }

 

posted @ 2022-11-09 13:38  最好的年纪  阅读(101)  评论(0编辑  收藏  举报