Table of Contents

Class RetrieveContentQueryParametersBase<T>

Namespace
Kentico.Content.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Base class for query parameters used during content retrieval. IContentRetriever

public abstract class RetrieveContentQueryParametersBase<T> : RetrieveQueryParametersBase<T> where T : RetrieveContentQueryParametersBase<T>

Type Parameters

T
Inheritance
object
RetrieveContentQueryParametersBase<T>
Derived
Inherited Members
Extension Methods

Methods

InSmartFolder(Guid)

Filters the query to return only content items that are in the specified smart folder.

public T InSmartFolder(Guid smartFolderGuid)

Parameters

smartFolderGuid Guid

Guid of the smart folder.

Returns

T

Returns this T instance to chain further configuration.

InSmartFolder(int)

Filters the query to return only content items that are in the specified smart folder.

public T InSmartFolder(int smartFolderId)

Parameters

smartFolderId int

Id of the smart folder.

Returns

T

Returns this T instance to chain further configuration.

InSmartFolder(string)

Filters the query to return only content items that are in the specified smart folder.

public T InSmartFolder(string smartFolderName)

Parameters

smartFolderName string

Name of the smart folder.

Returns

T

Returns this T instance to chain further configuration.

IncludeTotalCount()

Configures query to include total count of results when the query has Offset(int, int) configured.

public T IncludeTotalCount()

Returns

T

Returns T instance to chain further configuration.

LinkedFrom(string, string, IEnumerable<IContentItemIdentifier>)

Retrieves content items of the specified contentTypeName linked from referenceFieldName.

public T LinkedFrom(string contentTypeName, string referenceFieldName, IEnumerable<IContentItemIdentifier> items)

Parameters

contentTypeName string

Content type name referencing content items to be retrieved.

referenceFieldName string

Name of the field within contentTypeName referencing content items to be retrieved.

items IEnumerable<IContentItemIdentifier>

Collection of IContentItemIdentifier of items for which to retrieve the linked items.

Returns

T

Returns this T instance to chain further configuration.

Remarks

LinkedFromSchemaField(string, IEnumerable<IContentItemIdentifier>)

Retrieves content items linked from referenceSchemaFieldName.

public T LinkedFromSchemaField(string referenceSchemaFieldName, IEnumerable<IContentItemIdentifier> items)

Parameters

referenceSchemaFieldName string

Name of the schema field referencing content items to be retrieved.

items IEnumerable<IContentItemIdentifier>

Collection of IContentItemIdentifier of items for which to retrieve the linked items.

Returns

T

Returns this T instance to chain further configuration.

Remarks

LinkingSchemaField(string, IEnumerable<int>)

Configure query to retrieve linked items which reference in the referenceSchemaFieldName.

public T LinkingSchemaField(string referenceSchemaFieldName, IEnumerable<int> items)

Parameters

referenceSchemaFieldName string

Name of the schema field referencing content items to be retrieved.

items IEnumerable<int>

Identifiers of items which are linked from the retrieved items.

Returns

T

Returns this T instance to chain further configuration.

Remarks

Simultaneous call with LinkedFrom(string, string, IEnumerable<IContentItemIdentifier>) or LinkedFromSchemaField(string, IEnumerable<IContentItemIdentifier>) is not supported. Multiple calls of this method are not supported.

Offset(int, int)

Configures the offset and number of records to be returned.

public T Offset(int offset, int fetch)

Parameters

offset int

Index of the first record to return.

fetch int

Number of records to return.

Returns

T

Returns T instance to chain further configuration.

Remarks

Requires configured ordering via OrderBy(params OrderByColumn[]) method - it guarantees consistently ordered results. Cannot be combined with TopN(int). Using Offset(int, int) is recommended to implement a query paging solution.

See Also

OrderBy(params OrderByColumn[])

Configures one or multiple columns to perform order defined by arguments.

public T OrderBy(params OrderByColumn[] columns)

Parameters

columns OrderByColumn[]

Columns to perform order represented as OrderByColumn.

Returns

T

Returns T instance to chain further configuration.

See Also
Asc(string)
Desc(string)

OrderBy(params string[])

Configures one or multiple columns to perform ascending order.

public T OrderBy(params string[] columnNames)

Parameters

columnNames string[]

Names of columns to perform order.

Returns

T

Returns T instance to chain further configuration.

TopN(int)

Configures number of records to be returned.

public T TopN(int topN)

Parameters

topN int

Number of records to return.

Returns

T

Returns T instance to chain further configuration.

Remarks

Cannot be combined with Offset(int, int). Use Offset(int, int) instead to implement a query paging solution.

Where(Action<WhereParameters>)

Configures query to extract only those records that fulfill a specified condition.

public T Where(Action<WhereParameters> configureWhere)

Parameters

configureWhere Action<WhereParameters>

Action configuring the where condition tree using the WhereParameters.

Returns

T

Returns T instance to chain further configuration.