Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
How would I construct a query to exclude nodes which have a property equal to a particular string?
I can include only those by using the following:
.Where(x => x.GetProperty<String>("myCategory").Contains(myString))
Basically, what's the opposite of this? Or, is there an .Excludes() or similar?
.Excludes()
Thanks.
Just:
.Where(x => x.GetProperty<String>("myCategory").Contains(myString) == false)
Many thanks, David!
Or even this should work:
.Where(x => !x.GetProperty<String>("myCategory").Contains(myString))
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Razor query - "does not contain"
Hi All,
How would I construct a query to exclude nodes which have a property equal to a particular string?
I can include only those by using the following:
Basically, what's the opposite of this? Or, is there an
.Excludes()
or similar?Thanks.
Just:
Many thanks, David!
Or even this should work:
is working on a reply...