Performs a query with a projection, and materialises the results as the specified type.

Namespace:  Mindscape.LightSpeed
Assembly:  Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)

Syntax

C#
IList<T> Project<T>(
	Query query
)
Visual Basic (Declaration)
Function Project(Of T) ( _
	query As Query _
) As IList(Of T)

Parameters

query
Type: Mindscape.LightSpeed.Querying..::.Query
The query to be performed.

Type Parameters

T
The type of object to be materialised from the query results.

Return Value

A list of objects of the specified type.

Remarks

The results of the projection are not entities, and are not associated with the unit of work.

Examples

CopyC#
Query query = new Query(typeof(Product));
query.Projection.Add("Name");
query.Projection.Add("Price");

// PricingInfo is a non-entity class with Name and Price properties
IList<PricingInfo> pricingInfo = unitOfWork.Project<PricingInfo>(query);

See Also