I am using LINQ with Entity Framework, and I need to get the SQL server time. Can anyone tell me how can I 开发者_如何学Pythoncreate a method so it retrieves the current server time? Thank you.
Just execute a ExecuteStoreQuery
command.
Dim dateTimeVal As DateTime = context.ExecuteStoreQuery(Of DateTime)("select getdate()").First()
精彩评论