DbFunctions.Left-Methode
[Diese Seite bezieht sich auf Entity Framework Version 6. Die neueste Version ist als 'Entity Framework' NuGet-Paket verfügbar. Weitere Informationen zu Entity Framework finden Sie unter msdn.com/data/ef.]
Wenn sie als Teil einer LINQ to Entities-Abfrage verwendet wird, ruft diese Methode die kanonische "Left"-EDM-Funktion auf, um eine gegebene Anzahl des äußersten linken Zeichens in einer Zeichenfolge zurückzugeben.
Namespace: System.Data.Entity
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "length")> _
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "stringArgument")> _
<SuppressMessageAttribute("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId := "string")> _
<DbFunctionAttribute("Edm", "Left")> _
Public Shared Function Left ( _
stringArgument As String, _
length As Nullable(Of Long) _
) As String
'Usage
Dim stringArgument As String
Dim length As Nullable(Of Long)
Dim returnValue As String
returnValue = DbFunctions.Left(stringArgument, _
length)
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "length")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "stringArgument")]
[SuppressMessageAttribute("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string")]
[DbFunctionAttribute("Edm", "Left")]
public static string Left(
string stringArgument,
Nullable<long> length
)
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"length")]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"stringArgument")]
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1720:IdentifiersShouldNotContainTypeNames", MessageId = L"string")]
[DbFunctionAttribute(L"Edm", L"Left")]
public:
static String^ Left(
String^ stringArgument,
Nullable<long long> length
)
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "length")>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "stringArgument")>]
[<SuppressMessageAttribute("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string")>]
[<DbFunctionAttribute("Edm", "Left")>]
static member Left :
stringArgument:string *
length:Nullable<int64> -> string
public static function Left(
stringArgument : String,
length : Nullable<long>
) : String
Parameter
- stringArgument
Typ: System.String
Die Eingabezeichenfolge.
- length
Typ: System.Nullable<Int64>
Die Anzahl der zurückzugebenden Zeichen.
Rückgabewert
Typ: System.String
Eine Zeichenfolge, die die Anzahl der Zeichen enthält, nach der vom linken Rand der Eingabezeichenfolge gefragt wurde.
Hinweise
Sie können diese Funktion nicht direkt aufrufen. Diese Funktion kann nur innerhalb einer LINQ to Entities-Abfrage vorkommen. Diese Funktion wird in eine entsprechende Funktion in der Datenbank übersetzt.