GenericExpressionHandlerCoerceToType Method |
Coerces the linq expression to the targettype.
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 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