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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.