Επεξεργασία

Κοινή χρήση μέσω


EdmFunctions.Replace(DbExpression, DbExpression, DbExpression) Method

Definition

Creates a DbFunctionExpression that invokes the canonical 'Replace' function with the specified arguments, which must each have a string result type. The result type of the expression is also string.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Replace(System::Data::Common::CommandTrees::DbExpression ^ stringArgument, System::Data::Common::CommandTrees::DbExpression ^ toReplace, System::Data::Common::CommandTrees::DbExpression ^ replacement);
public static System.Data.Common.CommandTrees.DbFunctionExpression Replace (this System.Data.Common.CommandTrees.DbExpression stringArgument, System.Data.Common.CommandTrees.DbExpression toReplace, System.Data.Common.CommandTrees.DbExpression replacement);
static member Replace : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Replace (stringArgument As DbExpression, toReplace As DbExpression, replacement As DbExpression) As DbFunctionExpression

Parameters

stringArgument
DbExpression

An expression that specifies the string in which to perform the replacement operation.

toReplace
DbExpression

An expression that specifies the string that is replaced.

replacement
DbExpression

An expression that specifies the replacement string.

Returns

A new DbFunctionExpression than returns a new string based on stringArgument where every occurrence of toReplace is replaced by replacement.

Exceptions

stringArgument or toReplace or replacement is null.

stringArgument or toReplace or replacement is invalid.

Applies to