DbFunctions.Right, méthode
[Cette page concerne Entity Framework version 6. La dernière version est disponible sous le nom de package 'Entity Framework' NuGet. Pour plus d'informations sur Entity Framework, consultez msdn.com/data/ef.]
Lorsqu'elle est utilisée dans le cadre d'une requête LINQ to Entities, cette méthode appelle la fonction EDM canonique Right pour retourner le nombre donné de caractères le plus à droite dans une chaîne.
Espace de noms : System.Data.Entity
Assembly : EntityFramework (dans EntityFramework.dll)
Syntaxe
'Déclaration
<SuppressMessageAttribute("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId := "string")> _
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "stringArgument")> _
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "length")> _
<DbFunctionAttribute("Edm", "Right")> _
Public Shared Function Right ( _
stringArgument As String, _
length As Nullable(Of Long) _
) As String
'Utilisation
Dim stringArgument As String
Dim length As Nullable(Of Long)
Dim returnValue As String
returnValue = DbFunctions.Right(stringArgument, _
length)
[SuppressMessageAttribute("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "stringArgument")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "length")]
[DbFunctionAttribute("Edm", "Right")]
public static string Right(
string stringArgument,
Nullable<long> length
)
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1720:IdentifiersShouldNotContainTypeNames", MessageId = L"string")]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"stringArgument")]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"length")]
[DbFunctionAttribute(L"Edm", L"Right")]
public:
static String^ Right(
String^ stringArgument,
Nullable<long long> length
)
[<SuppressMessageAttribute("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string")>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "stringArgument")>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "length")>]
[<DbFunctionAttribute("Edm", "Right")>]
static member Right :
stringArgument:string *
length:Nullable<int64> -> string
public static function Right(
stringArgument : String,
length : Nullable<long>
) : String
Paramètres
- stringArgument
Type : System.String
Chaîne d'entrée.
- length
Type : System.Nullable<Int64>
Nombre de caractères à retourner.
Valeur de retour
Type : System.String
Chaîne contenant le nombre de caractères demandés en partant de la droite de la chaîne d'entrée.
Notes
Vous ne pouvez pas appeler directement cette fonction. Cette fonction peut s'afficher uniquement dans une requête LINQ to Entities. Cette fonction est traduite en une fonction correspondante dans la base de données.