Click or drag to resize

QuerySpecExtensionMethodsSelectT Method (DynamicQuery, ExpressionFuncT)

Specifies the projection of the query specified. It clears any existing projection and sets the projection to the one specified. This variant converts the specified projectionFunc into the projector lambda to pass to WithProjector and extracts the elements to place in the SQL query's projection from the projectionFunc. Use this overload to specify a typed resultset.

Namespace:  SD.LLBLGen.Pro.QuerySpec
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.11.0.0 (5.11.23.1114)
Syntax
public static DynamicQuery<T> Select<T>(
	this DynamicQuery query,
	Expression<Func<T>> projectionFunc
)

Parameters

query
Type: SD.LLBLGen.Pro.QuerySpecDynamicQuery
The query.
projectionFunc
Type: System.Linq.ExpressionsExpressionFuncT
The projection func.

Type Parameters

T

Return Value

Type: DynamicQueryT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DynamicQuery. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Calling this method on a DynamicQuery<T> will overwrite the already set projector and change the type to the return type of the projectionFunc specified as argument to this method.
See Also