📅  最后修改于: 2022-03-11 14:57:31.945000             🧑  作者: Mango
if (!string.IsNullOrEmpty(qsId))
{
// default false
var inner = PredicateBuilder.False();
// first or
inner = inner.Or (i =>
Regex.IsMatch(i.GetProperty("makeTag").Value.ToString(), "\\b" +
qsId + "\\b");
// second or
inner = inner.Or (i =>
string.IsNullOrEmpty(i.GetProperty("makeTag")).Value.ToString());
predicate = predicate.And(inner);
}