I've got an entity called new_trexmail with a string attribute called new_contextline.
I'm trying to get a list of entities where new_contextlineis in a defined list.
The following code fails with the error : NotSupportedException: Invalid 'where' condition. An entity member is invoking an invalid property or method.
string[] test = new[]{"aaa", "hhh"};
var query = from n in New_trexmailSet
where test.Contains(n.New_contextline)
select n;
I understand why this error is being thrown but I'm wondering if it's possible to do the equiavalent of an IN clause using XRM.
If it is possible then how do I go about getting XRM to execute SELECT * FROM new_trexmail WHERE new_contextline in ('aaa', 'hhh')
?
Thanks,
David
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…