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