ibatis.net 循環
阿新 • • 發佈:2019-03-04
pro null empty orm .net split 循環 form ati }
ht.Add("TagList", personList);
} </iterate>
</isNotEmpty>
</isPropertyAvailable>
if (oReqV[0]["tag"] != null && !string.IsNullOrEmpty(oReqV[0]["tag"].ToString()))
{
string[] str = StringHelps.SplitString(oReqV[0]["tag"].ToString(), ",");
List<string> personList = new List<string>();
foreach(string s in str)
{
personList.Add(string.Format("%{0}%",s));
ht.Add("TagList", personList);
}
<isPropertyAvailable property="TagList">
<isNotEmpty property="TagList">
<iterate property="TagList" prepend="AND" open="(" close=")" conjunction="OR">
<![CDATA[Tag LIKE #TagList[]# ]]>
</isNotEmpty>
</isPropertyAvailable>
ibatis.net 循環