Compartir a través de


DbFunctions.Right (Método)

[Esta página es específica de la versión 6 de Entity Framework. La versión más reciente está disponible como el paquete NuGet de Entity Framework. Para más información sobre Entity Framework, consulte msdn.com/es-ES/data/ef].

Cuando se usa como parte de una consulta LINQ to Entities, este método invoca la función canónica Right de EDM para devolver un número especificado de los caracteres situados más a la derecha de una cadena.

Espacio de nombres:  System.Data.Entity
Ensamblado:  EntityFramework (en EntityFramework.dll)

Sintaxis

'Declaración
<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
'Uso
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

Parámetros

Valor devuelto

Tipo: System.String
Cadena que contiene el número de caracteres especificado desde el lado derecho de la cadena de entrada.

Comentarios

No se puede llamar directamente a esta función. Esta función solo puede aparecer dentro de una consulta LINQ to Entities. Esta función se traduce a una función correspondiente de la base de datos.

Vea también

Referencia

DbFunctions Clase

System.Data.Entity (Espacio de nombres)