开发者

CurrentDateTime() in EF

I use this code to get Server Date but I really don't understand.CreateDateTime() is not a sql function.so what is it?

DateTime ServerDate = Entities.Cre开发者_如何学GoateQuery<DateTime>("CurrentDateTime()").AsEnumerable().First();

I think the string that comes in CreateQuery function must be a sql query.Is it wrong?

I have open the SSMS and write CurrentDateTime() and i got an error,I have test this too: SELECT CurrentDateTime(), and i got an error agian,CurrentDateTime() is not a sql function


CurrentDateTime() is one of the Date and Time Canonical Functions of the Entity SQL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜