I think that this is because when you pass the string parameter to a .Where method it uses a dynamic expression parser and the fixed properties that are supported to not include DocumentTypeId (i'm 100% clear on this though). Anyway, you can do what you need with the lambda expression:
DocumentTypeId in Where not working?
Hello
I am trying to get a set of nodes based on thier DocumentTypeId (from at Macro contentTypeMultiple list). But the following code do not work:
but
works?
The reason why i am not using the last one is that i want to generate a flexible query, which can contain multiple DocumentTypeIds with OR. Ex:
Is there any reason that the first Where query dont work and the second does?
Hi,
I think that this is because when you pass the string parameter to a .Where method it uses a dynamic expression parser and the fixed properties that are supported to not include DocumentTypeId (i'm 100% clear on this though). Anyway, you can do what you need with the lambda expression:
Thanks,
Jeavon
I wonder if Contains would work too here? You could eliminate need for any string generation. For example: (warning not tested!)
Good luck!
is working on a reply...