EdmFunctions.AddMonths(DbExpression, DbExpression) Metoda

Definice

Vytvoří DbFunctionExpression , která vyvolá kanonickou funkci AddMonths se zadanými argumenty, které musí mít typy výsledků DateTime nebo DateTimeOffset a celočíselné typy. Typ výsledku výrazu je stejný jako typ výsledku dateValue.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ AddMonths(System::Data::Common::CommandTrees::DbExpression ^ dateValue, System::Data::Common::CommandTrees::DbExpression ^ addValue);
public static System.Data.Common.CommandTrees.DbFunctionExpression AddMonths(this System.Data.Common.CommandTrees.DbExpression dateValue, System.Data.Common.CommandTrees.DbExpression addValue);
static member AddMonths : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function AddMonths (dateValue As DbExpression, addValue As DbExpression) As DbFunctionExpression

Parametry

dateValue
DbExpression

Výraz, který určuje hodnotu, ke které addValue se má přidat.

addValue
DbExpression

Výraz, který určuje počet měsíců, které mají být přidány .dateValue

Návraty

Nový DbFunctionExpression, který sečte počet měsíců určený addValue hodnotou určenou dateValuehodnotou .

Výjimky

dateValue nebo addValue je null.

dateValue nebo addValue je neplatný.

Platí pro