Class QueryModel
Represents a query model for building template queries with filters and sorting.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.TemplateQuery
Assembly: Umbraco.Core.dll
Syntax
public class QueryModel
Constructors
View SourceQueryModel()
Declaration
public QueryModel()
Properties
View SourceContentType
Gets or sets the content type to filter by.
Declaration
public ContentTypeModel? ContentType { get; set; }
Property Value
| Type | Description |
|---|---|
| ContentTypeModel |
Filters
Gets or sets the collection of filter conditions.
Declaration
public IEnumerable<QueryCondition>? Filters { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<QueryCondition> |
Sort
Gets or sets the sort expression for ordering results.
Declaration
public SortExpression? Sort { get; set; }
Property Value
| Type | Description |
|---|---|
| SortExpression |
Source
Gets or sets the source node for the query.
Declaration
public SourceModel? Source { get; set; }
Property Value
| Type | Description |
|---|---|
| SourceModel |
Take
Gets or sets the maximum number of items to return.
Declaration
public int Take { get; set; }
Property Value
| Type | Description |
|---|---|
| int |