Condividi tramite


Metodo SqlFunctions.GetDate

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Restituisce il timestamp di sistema del database corrente come valore datetime senza la differenza di fuso orario del database. Il valore deriva dal sistema operativo del computer in cui è in esecuzione l'istanza di SQL Server.

Spazio dei nomi:  System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

Sintassi

'Dichiarazione
<DbFunctionAttribute("SqlServer", "GETDATE")> _
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
Public Shared Function GetDate As Nullable(Of DateTime)
'Utilizzo
Dim returnValue As Nullable(Of DateTime)

returnValue = SqlFunctions.GetDate()
[DbFunctionAttribute("SqlServer", "GETDATE")]
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public static Nullable<DateTime> GetDate()
[DbFunctionAttribute(L"SqlServer", L"GETDATE")]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
public:
static Nullable<DateTime> GetDate()
[<DbFunctionAttribute("SqlServer", "GETDATE")>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
static member GetDate : unit -> Nullable<DateTime> 
public static function GetDate() : Nullable<DateTime>

Valore restituito

Tipo: System.Nullable<DateTime>
Timestamp del database corrente.

Vedere anche

Riferimento

SqlFunctions Classe

Spazio dei nomi System.Data.Entity.SqlServer