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 的最左边的子字符串。

适用于