Click or drag to resize

ExpressionParameterReplacer.ReplaceParameter Method

Replaces all occurences of one parameter with a different parameter.

Namespace:  MongoDB.Driver.Linq
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.9.0+32b058abcdf2c7e8d9dd3a676d207b31897eee2e
Syntax
public static Expression ReplaceParameter(
	Expression node,
	ParameterExpression fromParameter,
	Expression toExpression
)

Parameters

node
Type: System.Linq.Expressions.Expression
The expression containing the parameter that should be replaced.
fromParameter
Type: System.Linq.Expressions.ParameterExpression
The from parameter.
toExpression
Type: System.Linq.Expressions.Expression
The expression that replaces the parameter.

Return Value

Type: Expression
The expression with all occurrences of the parameter replaced.
See Also