EdmFunctions.DiffYears(DbExpression, DbExpression) Metodo

Definizione

Crea un oggetto DbFunctionExpression che richiama la funzione 'DiffYears' canonica con gli argomenti specificati, ognuno dei quali deve presentare un tipo di risultato DateTime o DateTimeOffset. Il tipo di risultato dell'espressione è Edm.Int32.

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

Parametri

dateValue1
DbExpression

Espressione che specifica il primo argomento di valore di data.

dateValue2
DbExpression

Espressione che specifica il secondo argomento di valore di data.

Restituisce

Nuovo DbFunctionExpression che restituisce il numero di anni che è la differenza tra dateValue1 e dateValue2.

Si applica a