次の方法で共有


DbFunctions.Right メソッド

[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]

LINQ to Entities クエリの一部として使用された場合、このメソッドは、文字列内の右端の文字を指定数返す Right EDM 正規関数を呼び出します。

名前空間:  System.Data.Entity
アセンブリ:  EntityFramework (EntityFramework.dll 内)

構文

'宣言
<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
'使用
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

パラメーター

戻り値

型 : System.String
入力文字列の右から要求された文字数を含む文字列。

解説

この関数を直接呼び出すことはできません。 この関数は、LINQ to Entities クエリ内でのみ使用できます。 この関数は、データベース内の対応する関数に変換されます。

参照

参照

DbFunctions クラス

System.Data.Entity 名前空間