ProjectionLambdaCreatorCreateT Method (IEntityFieldsCore, 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.QuerySpecAssembly: SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.0.0.0 (5.0.0)
Syntax public static Expression<Func<T>> Create<T>(
IEntityFieldsCore fields,
bool fieldsOrderIsLeading
)
where T : new()
Public Shared Function Create(Of T As New) (
fields As IEntityFieldsCore,
fieldsOrderIsLeading As Boolean
) As Expression(Of Func(Of T))
Parameters
- fields
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityFieldsCore
The fields which will be used for source for the projection. - fieldsOrderIsLeading
- Type: SystemBoolean
if set to true it will walk each field in the order in fields 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