Can someone please explain why this works. I want to retrieve all property listings where the proeprtyCategory value is set to 'To Let' in a drop down data type
var propertiesToLet = Model.Content.Descendants("propertyListingPage").Where(x => x.GetPropertyValue<bool>("propertyCategory")).ToList().OrderBy("CreateDate desc");
and this doesnt
var propertiesToLet = Model.Content.Descendants("propertyListingPage").Where(x => x.GetPropertyValue<string>("propertyCategory == To Let")).ToList().OrderBy("CreateDate desc");
Getting dropdown property value from descendant
Hi All,
Can someone please explain why this works. I want to retrieve all property listings where the proeprtyCategory value is set to 'To Let' in a drop down data type
and this doesnt
many thanks
Paul
I think just a little syntax issue:
Hi Jeavon,
Thanks for the response, sorry for the late reply ive been out all day.
You are absolutely correct though, what you suggested works just fine.
Thanks for you help
Paul
Great!
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.