Click or drag to resize

LinqUtilsConvertLocalExpressionToRealObject Method

Converts the local expression to a real object. This is done by a trick: we'll compile the whole expression as a lambda and run it. this will return the object, including initialization results and completely materialized as we want it. The passed in expression is for example a list or array initialization / ctor call. To utilize the in-memory object, we've to run this ctor to be able to use the values. This routine takes care of that.

Namespace:  SD.LLBLGen.Pro.LinqSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.9.0.0 (5.9.0)
Syntax
public static ConstantExpression ConvertLocalExpressionToRealObject(
	Expression toConvert
)

Parameters

toConvert
Type: System.Linq.ExpressionsExpression
To convert.

Return Value

Type: ConstantExpression
The result of the expression after running it wrapped in a ConstantExpression.
See Also