語言

EdmFunctions.DiffSeconds(DbExpression, DbExpression) 方法

定義

建立 DbFunctionExpression 一個,呼叫典型的「DiffSeconds」函式,並指定參數,每個參數必須有 DateTime、DateTimeOffset 或 Time 結果型別。 表達式的結果類型為Edm.Int32。

public static System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression DiffSeconds(this System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue1, System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue2);
static member DiffSeconds : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function DiffSeconds (timeValue1 As DbExpression, timeValue2 As DbExpression) As DbFunctionExpression

參數

timeValue1
DbExpression

一個指定首次時間值參數的表達式。

timeValue2
DbExpression

一個指定第二個時間值參數的表達式。

傳回

一個新的 DbFunctionExpression,回傳 timeValue1 與 timeValue2 之間的秒數差值。

適用於