• SqlParameter 之 in


    List<string> ConditionList = new List<string>();
    List<string> tempParameters = new List<string>();//用来存(@a0,@a1,@a2)
    string value = HttpContext.Current.Request[parameter.ParameterCode];//请求过来的数据
    string[] valueArr = value.Split(",");
    for (int i = 0; i < valueArr.Length; i++)
    {
    tempParameters.Add($"@{parameter.ParameterCode}{i}");//@a0
    sqlParameters.Add(new SqlParameter()
    {
    ParameterName = $"@{parameter.ParameterCode}{i}",
    Value = valueArr[i]
    });
    }
    ConditionList.Add($"{parameter.TableCode}.{parameter.FieldsCode} in({string.Join(",", tempParameters)})");

  • 相关阅读:
    js-依次循环异步请求(普通/ES6)
    jquery
    js
    selenium
    selenium
    selenium
    python
    selenium
    selenium
    selenium
  • 原文地址:https://www.cnblogs.com/gaocong/p/7942025.html
Copyright © 2020-2023  润新知