GenericExpressionHandlerCoerceToType Method |
Coerces the linq expression to the targettype.
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 CoerceToType(
Expression toCoerce,
Type targetType
)
Public Shared Function CoerceToType (
toCoerce As Expression,
targetType As Type
) As Expression
Parameters
- toCoerce
- Type: System.Linq.ExpressionsExpression
To coerce. - targetType
- Type: SystemType
Type of the target.
Return Value
Type:
ExpressiontoCoerce if toCoerce's type is equal to targetType, otherwise it's wrapped in a Convert
See Also