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.
精彩评论