Click or drag to resize

IUserSessionStreamQueryAllT, TIndex Method


Queries the content store using a LINQ expression, returning a collection of objects of the given type.

The CSAPI creates indexes in the content store to expedite object lookup. The 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 further flexibility 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: 10.6.492
Syntax
IEnumerable<T> StreamQueryAll<T, TIndex>(
	Expression<Func<T, bool>> query,
	out int totalResults,
	Action<int> stepFunc = null
)
where TIndex : new(), AbstractIndexCreationTask

Parameters

query  ExpressionFuncT, Boolean

[Missing <param name="query"/> documentation for "M:Ingeniux.CMS.IUserSession.StreamQueryAll``2(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Int32@,System.Action{System.Int32})"]

totalResults  Int32

[Missing <param name="totalResults"/> documentation for "M:Ingeniux.CMS.IUserSession.StreamQueryAll``2(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Int32@,System.Action{System.Int32})"]

stepFunc  ActionInt32  (Optional)

[Missing <param name="stepFunc"/> documentation for "M:Ingeniux.CMS.IUserSession.StreamQueryAll``2(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Int32@,System.Action{System.Int32})"]

Type Parameters

T
Type of objects to retrieve
TIndex
Type of the index class

Return Value

IEnumerableT
A collection of objects of the given type. Deferred execution.
Remarks

Because the execution of the query is deferred, additional queries can be applied to the result and be executed on content-store side. 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 convet the result to an array using the "ToArray()" method.

See Also