更新时间:2023-02-07 14:58:23
您是对的,似乎是在ObjectParameter构造函数中的一个错误。 但是,Value属性似乎接受空值。 尝试替换您的code:
You are right, seems to be a bug in the ObjectParameter constructor. But the Value property seems to accept null values. Try to replace your code with:
var prm = new ObjectParameter("p", typeof(string));
prm.Value = name;
var results = context.CreateQuery<WorkflowInstance>(
query, prm).ToList();
如果您指定的参数值直接在code似乎工作。
If you assign the Value parameter directly the code seems to work.
达维德