I'm using Umbraco 13.4.0 and I have a content type called 'landingPage' that has different fields like 'Description', 'City', etc. I'm using the code below to query for names, but how can I query for custom fields, like city, etc?
IQuery<IContent> query = null;
if (!string.IsNullOrEmpty(name))
{
query = new Query<IContent>(sqlContext).Where(u => u.Name.Contains(name, StringComparison.CurrentCultureIgnoreCase));
}
var result = contentService.GetPagedOfTypes(["landingPage"], 1, 50, out long totalRecords, query, ordering);
return new(result, totalRecords);
IQuery custom field search
I'm using Umbraco 13.4.0 and I have a content type called 'landingPage' that has different fields like 'Description', 'City', etc. I'm using the code below to query for names, but how can I query for custom fields, like city, etc?
is working on a reply...