Click or drag to resize

ProjectionLambdaCreatorCreateT Method (IListIEntityFieldCore, Boolean)

Creates the lambda which instantiates a new T instance and specified fields. Each property of T which has a similarly named field in fields gets a projection call in the returned lambda.

Namespace:  SD.LLBLGen.Pro.QuerySpec
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.4.0.0 (5.4.0)
Syntax
public static Expression<Func<T>> Create<T>(
	IList<IEntityFieldCore> fields,
	bool fieldsOrderIsLeading
)

Parameters

fields
Type: System.Collections.GenericIListIEntityFieldCore
The fields which will be used for source for the projection.
fieldsOrderIsLeading
Type: SystemBoolean
if set to true it will walk each field fields in the order in which they're stored and then lookup the corresponding property to build a projector. If set to false, it will walk all properties and lookup the corresponding field. Set to true for when the source to project from isn't created from the projector but constructed elsewhere

Type Parameters

T
type of the element the lambda has to create instances of

Return Value

Type: ExpressionFuncT
ready to use lambda for Select(Of T)
Remarks
Doesn't use lambda cache, so always builds a fresh lambda that isn't cached.
See Also