EdmFunctions.Year(DbExpression) Metoda

Definicja

Tworzy obiekt DbFunctionExpression , który wywołuje kanoniczną funkcję "Year" z określonym argumentem, który musi mieć typ wyniku DateTime lub DateTimeOffset. Typ wyniku wyrażenia to Edm.Int32.

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

Parametry

dateValue
DbExpression

Wyrażenie określające wartość, z której ma zostać pobrany rok.

Zwraca

Nowa wartość DbFunctionExpression zwracająca wartość roku całkowitego z .dateValue

Wyjątki

dateValue to null.

Nazwa dateValue jest niepoprawna.

Dotyczy