共用方式為


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

定義

建立會使用指定引數叫用標準 'Replace' 函式的 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

運算式,指定取代字串。

傳回

根據 stringArgument (其中出現的每個 toReplace 項目由 replacement 所取代) 傳回新字串的新 DbFunctionExpression。

適用於