IUserSessionQueryT, TIndex Method Ingeniux CMS Content Store API

Queries the content store and returns a collection of objects of a given type. The query is based on the type of index provided.

THe CSAPI creates indexes in the content store to expedite object lookup. CSAPI comes with a set of indexes for its basic functionality. All strong-typed queries go through this method. Additional custom indexes can be created to provide even further flexibilities on fast lookup. Please refer to the Indexing topic for more information on indexes and custom indexes.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
Syntax

IRavenQueryable<T> Query<T, TIndex>()
where TIndex : new(), AbstractIndexCreationTask

Type Parameters

T
Type of objects to retrieve
TIndex
Type of index to use

Return Value

Type: IRavenQueryableT
Collection of objects with a given type. Deferred execution.
Remarks

By default, the query returns all objects indexed with a given index type.

Because the execution of query is deferred, additional queries can be applied to the result and executed on content-store side. In order for the query to be executed on content-store side, additional queries cannot use any of the object's methods, only fields and direct properties. If content store–side execution is not required, you should first convert the result to an array using the "ToArray()" method.

See Also

Reference