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.12.0.0 (5.12.0)
Syntaxpublic static DynamicQuery<T> Select<T>(
this DynamicQuery query,
Expression<Func<T>> projectionFunc
)
<ExtensionAttribute>
Public Shared Function Select(Of T) (
query As DynamicQuery,
projectionFunc As Expression(Of Func(Of T))
) As DynamicQuery(Of T)
Parameters
- query
- Type: SD.LLBLGen.Pro.QuerySpecDynamicQuery
The query. - projectionFunc
- Type: System.Linq.ExpressionsExpressionFuncT
The projection func.
Type Parameters
- T
Return Value
Type:
DynamicQueryTUsage 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).
RemarksCalling 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