GetDate() using Entity Framework

前端 未结 3 610
你的背包
你的背包 2021-01-20 15:23

I am trying to use entity framework and get the date from the SQL server. The old way of doing this in LINQ is below but i\'m needing something for the entity framework:

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-20 15:46

    The EF Canonical function to return a UTC date time is: CurrentUtcDateTime()

    See also: http://msdn.microsoft.com/en-us/library/bb738563.aspx

提交回复
热议问题