I'm stuck with this, and I haven't seen any examples of how to do this. Here is what I want:
"Where Status = 'A' and Priority in (1, 2, 3, 4, 5)".
Here is my criteria:
CriteriaOperator co = CriteriaOperator.Parse("Status = ? AND Priority in (?)", "A", new int[ { 1, 2, 3, 4, 5 }");
the resultant co.ToString() on this is: [Status] = 'A' And [Priority] In ('System.Int32[') instead of the expected:
"[Status] = 'A' And [Priority] in (1, 2, 3, 4, 5)"
Creating this criteria manually using the InOperator("Priority", new int[ {1, 2, 3, 4, 5}); does produce the correct result. It seems as though the CriteriaOperator.Parse chooses to ignore the fact that the InOperator requires an ICollection type, and just does a .ToString() on the parameter instead.
Am I doing this wrong, or is this just impossible?
Josh Norris