EdmFunctions.AddYears(DbExpression, DbExpression) Metodo

Definizione

Crea un oggetto DbFunctionExpression che richiama la funzione 'AddYears' canonica con gli argomenti specificati, che devono presentare tipi di risultato DateTime, DateTimeOffset e Integer. Il tipo di risultato dell'espressione è lo stesso del tipo di risultato di dateValue.

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

Parametri

dateValue
DbExpression

Espressione che specifica il valore a cui addValue aggiungere.

addValue
DbExpression

Espressione che specifica il numero di anni da aggiungere a dateValue.

Restituisce

Nuovo DbFunctionExpression che aggiunge il numero di anni specificato dal addValue valore specificato da dateValue.

Eccezioni

dateValue o addValue è null.

dateValue o addValue non è valido.

Si applica a