語言

EdmFunctions.Replace(DbExpression, DbExpression, DbExpression) 方法

定義

建立 DbFunctionExpression 一個,用指定的參數呼叫典型的「替換」函式,且每個參數必須有字串結果型別。 表達式的結果類型也是字串。

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

參數

stringArgument
DbExpression

一個指定執行替換操作的字串的表達式。

toReplace
DbExpression

一個指定被替換字串的表達式。

replacement
DbExpression

一個指定替換字串的表達式。

傳回

接著會有一個新的 DbFunctionExpression 回傳一個基於 stringArgument 的新字串,其中每次 toReplace 的出現都會被替換替換。

適用於