次の方法で共有


DbFunctions.DiffMicroseconds メソッド (Nullable<TimeSpan>, Nullable<TimeSpan>)

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

LINQ to Entities クエリの一部として使用された場合、このメソッドは、2 つの期間の間のマイクロ秒数を計算する DiffMicroseconds EDM 正規関数を呼び出します。

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

構文

'宣言
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "timeValue1")> _
<DbFunctionAttribute("Edm", "DiffMicroseconds")> _
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "timeValue2")> _
Public Shared Function DiffMicroseconds ( _
    timeValue1 As Nullable(Of TimeSpan), _
    timeValue2 As Nullable(Of TimeSpan) _
) As Nullable(Of Integer)
'使用
Dim timeValue1 As Nullable(Of TimeSpan)
Dim timeValue2 As Nullable(Of TimeSpan)
Dim returnValue As Nullable(Of Integer)

returnValue = DbFunctions.DiffMicroseconds(timeValue1, _
    timeValue2)
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "timeValue1")]
[DbFunctionAttribute("Edm", "DiffMicroseconds")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "timeValue2")]
public static Nullable<int> DiffMicroseconds(
    Nullable<TimeSpan> timeValue1,
    Nullable<TimeSpan> timeValue2
)
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"timeValue1")]
[DbFunctionAttribute(L"Edm", L"DiffMicroseconds")]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"timeValue2")]
public:
static Nullable<int> DiffMicroseconds(
    Nullable<TimeSpan> timeValue1, 
    Nullable<TimeSpan> timeValue2
)
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "timeValue1")>]
[<DbFunctionAttribute("Edm", "DiffMicroseconds")>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "timeValue2")>]
static member DiffMicroseconds : 
        timeValue1:Nullable<TimeSpan> * 
        timeValue2:Nullable<TimeSpan> -> Nullable<int> 
public static function DiffMicroseconds(
    timeValue1 : Nullable<TimeSpan>, 
    timeValue2 : Nullable<TimeSpan>
) : Nullable<int>

パラメーター

戻り値

型 : System.Nullable<Int32>
最初と 2 番目の期間の間のマイクロ秒数。

解説

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

参照

参照

DbFunctions クラス

DiffMicroseconds オーバーロード

System.Data.Entity 名前空間