共用方式為


EdmFunctions.Left(DbExpression, DbExpression) 方法

定義

建立 DbFunctionExpression,其會利用指定的引數叫用標準 'Left' 函式,此作業的結果類型必須是字串與整數。 運算式的結果類型為字串。

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

參數

stringArgument
DbExpression

運算式,指定要從中擷取最左邊子字串的字串。

length
DbExpression

運算式,指定要從 stringArgument 擷取最左邊子字串的長度。

傳回

新的 DbFunctionExpression,其會傳回 stringArgument 最右邊長度為 length 個單位的子字串。

適用於