EdmFunctions.AddHours(DbExpression, DbExpression) Metod

Definition

Skapar en DbFunctionExpression som anropar den kanoniska funktionen AddHours med de angivna argumenten, som måste ha resultattyperna DateTime, DateTimeOffset eller Time och heltal. Resultattypen för uttrycket är samma som resultattypen timeValueför .

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

Parametrar

timeValue
DbExpression

Ett uttryck som anger det värde som addValue ska läggas till.

addValue
DbExpression

Ett uttryck som anger antalet timmar som ska läggas till i timeValue.

Returer

En ny DbFunctionExpression som lägger till det antal timmar som anges av addValue till det värde som anges av timeValue.

Undantag

timeValue eller addValue är null.

timeValue eller addValue är ogiltig.

Gäller för