EdmFunctions.AddHours(DbExpression, DbExpression) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立 DbFunctionExpression 一個,呼叫典型的「AddHours」函式,並指定參數,參數必須包含 DateTime、DateTimeOffset 或 Time,以及整數的結果類型。 該表達式的結果類型與 timeValue 的結果類型相同。
public static System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression AddHours(this System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue, System.Data.Entity.Core.Common.CommandTrees.DbExpression addValue);
static member AddHours : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function AddHours (timeValue As DbExpression, addValue As DbExpression) As DbFunctionExpression
參數
- timeValue
- DbExpression
一個表示式,指定應加值的值。
- addValue
- DbExpression
一個表示式,指定要加入 timeValue 的工時數。
傳回
一個新的 DbFunctionExpression,將 addValue 指定的工時數加到 timeValue 指定的值上。